Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix a bug where TextType content got newlines it shouldn't have #37
Conversation
@jeanetteclark and others found this while adding subscripts to an EML document. What happens is that as_jsonlist is reading in the contents of TextType `para` and `section` elements, and converting them to literal XML strings with this code. <para>H<subscript>2</subscript>O</para> gets turned into para H <subscript>2</subscript> O and calling as.character on the above followed by a paste with collapse = "\n" introduces newlines between each child of the para. This isn't a huge issue for most uses cases but, when rendering to HTML via XSLT, you end up with spaces between the H and the 2 because browsers are getting the the newline and converting it to whitespace. Fixes ropensci/EML#282
|
(Failed Travis build looks to be related to the recent switch from the |
|
Sweet! Thanks for catching this. Want to patch travis in the same PR? (Am
away from office and just with phone atm)
On Fri, Jul 19, 2019 at 6:24 PM Bryce Mecum ***@***.***> wrote:
(Failed Travis build looks to be related to the recent switch from the
opencpu/jq PPA to jeroen/jq so: unrelated to my PR I think). All tests
pass and devtools::check() comes back clean.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#37?email_source=notifications&email_token=AABWK6TKGOOYWCGOMW2M57LQAJLNFA5CNFSM4IFNB2XKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2NCF6Q#issuecomment-513417978>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABWK6RU67EI4TJINAJP3MLQAJLNFANCNFSM4IFNB2XA>
.
--
---
Carl Boettiger
http://carlboettiger.info/
|
|
Okay, done! |
@jeanetteclark and others found this while adding subscripts to
an EML document. What happens is that as_jsonlist is reading in
the contents of TextType
paraandsectionelements, andconverting them to literal XML strings with this code.
<para>H<subscript>2</subscript>O</para>gets turned intoand calling as.character on the above followed by a paste with
collapse = "\n" introduces newlines between each child of the para.
This isn't a huge issue for most uses cases but, when rendering to
HTML via XSLT, you end up with spaces between the H and the 2
because browsers are getting the the newline and converting it to
whitespace.
Fixes ropensci/EML#282