-
Notifications
You must be signed in to change notification settings - Fork 25
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
Code markup using backticks not right #460
Comments
thanks for reporting this issue, @gdamore I'll look into it |
@gdamore I just tried with the latest version of libasciidoc, using the following content in a file:
would you have an example of content in which the backsticks are not detected, please? |
Probably because it's nested in other markup. Here's the source document: https://github.com/nanomsg/nng/blob/master/docs/man/nng_setopt.3.adoc (There are many documents in that tree -- what I was doing was testing if I could use libasciidoc instead of the asciidoctor toolchain to publish my HTML markup -- the bugs you see are the results of diff'ing the output between asciidoctor and libasciidoc. I only tried this one sample page, and the results were different enough for me to decide to file bugs and wait for fixes before I try again.) (As an aside, I'm also extremely interested in having versions of this that can generate other output formats -- the NNG reference manual is currently generated using a modified version of asciidoctor-pdf but I'm not a ruby developer, and the results are somewhat unsatisfactory. I'd feel better tackling this in Go if I could.) |
Great, thanks for pointing me to this doc, this will be very helpful in fixing the bugs.
I have not started working on other outputs yet, to be honest. But the result of the parsing is an AST that is converted into HTML, so I guess it should be possible to plug another renderer to get a PDF output for example. |
Fixes bytesparadise#456 Fixes bytesparadise#460 Signed-off-by: Xavier Coulon <[email protected]>
#466) Modify the grammar to include a new rule to parse the labeled list item term to find footnotes, images, links and quoted text, but only when processing the draft document into the final document. The draft document will still have a "raw" string term, to keep the parsing of the whole document fast. Fixes #456 Fixes #460 Signed-off-by: Xavier Coulon <[email protected]>
@gdamore I've fixed the 3 issues you reported but I also opened #469, #470 and #473 to address the remaining diffs compared to the output produced by Asciidoctor on https://github.com/nanomsg/nng/blob/master/docs/man/nng_setopt.3.adoc. Once these 3 extra issues are fixed, the output should be identical ;) |
@gdamore I fixed all the issues you reported, plus the 3 other ones I opened when comparing the doc generated by Asciidoctor vs libasciidoc.
Asciidoctor generates the following output:
whereas libasciidoc does not begin the paragraph with an empty line:
I believe that this does not affect the rendering in the browser, and I also think it's cleaner without this blank line. Please don't hesitate to open other issues if you find some bugs or missing features! |
Thanks very much for this work. I'm going to have a look. |
I have markup for literals as
VALUE
-- for example:This should render as
But it passes through with the backticks untransformed.
The text was updated successfully, but these errors were encountered: