Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression of processing characters within < > #33

Closed
ronaldtse opened this issue Dec 13, 2018 · 8 comments
Closed

Regression of processing characters within < > #33

ronaldtse opened this issue Dec 13, 2018 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Dec 13, 2018

I have a document that contains text like this: <星>. These were rendered correctly (with asciidoctor 1.5.7.1, metanorma-iso 1.0.6) before.

When I did a bundle update (asciidoctor 1.5.8, metanorma-iso 1.0.11), all of this text disappeared.

This does not seem to be an asciidoctor problem because there was still no output when I manually required the older asciidoctor version (1.5.7.1).

This text <星> is rendered as completely missing in the XML.

@ronaldtse ronaldtse added the bug Something isn't working label Dec 13, 2018
@opoudjis
Copy link
Contributor

This may be the smart quote cleaner from https://github.com/pbhogan/sterile (which I've just introduced) being overactive with angle brackets or Chinese text. I'm assuming Chinese text itself renders fine?

@opoudjis
Copy link
Contributor

I've replicated it, will advise.

@ronaldtse
Copy link
Contributor Author

Thanks!

@opoudjis
Copy link
Contributor

opoudjis commented Dec 13, 2018

Yes, sterile's smart formatter is converting &lt; back to < (although I can't replicate it in isolation); I'll entity-encode its output, if I have to. I'm at work, so it won't be immediate.

@ronaldtse
Copy link
Contributor Author

The < character is fine with me, it's just that the text doesn't show up anymore?

@opoudjis
Copy link
Contributor

Yes, it's interpreting the <星> as markup! I will fix it, but this is my last day at work, and ppl are baying for my time. I will fix it tonight.

@ronaldtse
Copy link
Contributor Author

Holidays always compress stress, right before them 😉

opoudjis added a commit to metanorma/metanorma-gb that referenced this issue Dec 13, 2018
opoudjis added a commit to metanorma/metanorma-gb that referenced this issue Dec 13, 2018
@opoudjis
Copy link
Contributor

This is a problem in Nokogiri: whenever you traverse all nodes in an XML document, the &lt; and &gt; in any text nodes are presented as <, >. &amp;, on the other hand, is left alone. I am ensuring that the four instances where text nodes are manipulated through nokogiri traverse (two here, two in metanorma-gb) convert their <, > back to &lt;, &gt;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants