Draft: Render markdown by converting through asciidoc with pandoc #1439
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use pandoc to convert markdown to asciidoc, then convert the asciidoc to html using asciidoctor.
This has what I consider to be a blocking bug that would only be fixable in the upstream pandoc. Whenever there are multiple instances of
++
on the same line, asciidoc interprets the text in between pairs of++
to be a "inline passthrough". This makes it hard to use asciidoc to talk about C++, requiring special workarounds.This mangles, for example, the atomic readme.
Correct, current rendering:
Incorrect, rendering in this PR:
Notice how the link text is not correct and it says
C
andC11
instead ofC++
andC++11
.Here is a minimal repro using the editor at asciidoc.org:
It is probably a bug in pandoc that the
++
are not getting escaped. There are multiple open issues in pandoc around weird asciidoc escaping that seem similar, for example jgm/pandoc#2337. We could consider trying to fix the issue in pandoc, but it'd probably take me at least several days to understand the code.To see the results on staging, someone will have to clear the rendered content cache. Alternatively, I could change the cache key used for rendered readmes.
Fixes #1328