libasciidoc
libasciidoc copied to clipboard
render a pure-text, macro-free version of the adoc source
Having a renderer to output the source document but without all the Asciidoc syntax, so it can be then be processed by other tools such as indexers or grammar/spelling checkers.
see https://twitter.com/maxandersen/status/1237897900899930112
note: this may require that all document block elements retain a raw value.
From the HTML generator this is easy. Just render without tags. I think this could also just be a nice application of the custom templates -- basically emit a markup-free form of the parser.
One question might be preservation of the line numbers in the source document, as that's likely to be helpful for anyone trying to fix spelling problems.
Rendering plain text would help, but it would introduce issues such as spell checking stuff in backticks, or in code blocks, which often is not "English".
If I may, a better solution would be to output the AST of the parser, with line/column information. I'm unsure about how difficult it is to do that using Pigeon, though.