libasciidoc icon indicating copy to clipboard operation
libasciidoc copied to clipboard

render a pure-text, macro-free version of the adoc source

Open xcoulon opened this issue 5 years ago • 2 comments

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.

xcoulon avatar Mar 12 '20 05:03 xcoulon

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.

gdamore avatar Jun 06 '20 08:06 gdamore

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.

alexpdp7 avatar Sep 12 '22 09:09 alexpdp7