Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
un-escaped characters for asciidoc output #2337
Pandoc version 188.8.131.52 doesn't correctly escape
which asciidoc would render back as ...
Unfortunately, the rules for escaping asciidoc special chars are complex and I cannot point to a single place in the asciidoc documentation. The general rule is that the '' character is used to escape. So with correct quoting/escaping ...
Escaping with backslashes is not that easy in asciidoc, because it is very picky about only accepting a backslash escape in exactly that cases were it would recognize a command (with exceptions), otherwise it will render a backslash literal. (I'm using asciidoctor as the reference here, I haven't tried the orginal implementation)
will render a backslash for the first line:
Edit: Apparently, there is a much more reliable way to do this with passthroughs:
I believe I have another two instances of this but with this mediawiki, input:
I have used variations of the phrase "syntax defect" as a way to sanitize and minimize the real-life source, and to illustrate the defect. Converting the file with
There are two escape issues with the output identified below with
Before the characters indicated by the
To summarize: I believe there are two separate defects broadly related to unescaped characters:
MacOS 10.13.6, pandoc installed via homebrew.
Asciidoc is crazy!!
asciidoctor gives you
which isn't even well-formed HTML.
I have to believe this is a bug in asciidoctor and not the intended behavior. I'm not going to try to work around all these quirks.
EVen worse, if you try to escape the
The first backslash acts as an escape and the second one doesn't!