Re: Creating adoc files dynamically with blocks
Posted by
guidog on
URL: https://discuss.asciidoctor.org/Creating-adoc-files-dynamically-with-blocks-tp8165p8188.html
Thanks for the answer Dan
I am checking both approach at this moment, create a backend to AsciiDoc or use some XML as intermediate languages.
It is possible that a backend (using converter) or a pretty printer (using doc.blocks) will not be same as the original code because there are instructions like #ifdef or any code executed by the preprossor or the parser (syntax sugar/alias). It is not a problem in my case, but I expect this kind of issues.
I'll let you know when I have something functional, even if it doesn't cover all functionality.
I think the basic ideas about walk over the tree are explained in an old thread:
https://discuss.asciidoctor.org/Walking-the-Asciidoctor-document-tree-td479.htmlAlso I am checking about the different extensions.
https://asciidoctor-docs.netlify.app/asciidoctor/1.5/api/register-extensions/Regards,
guido