Login  Register

Re: Do I need an extension or not for the following use case ?

Posted by abelsromero on Apr 09, 2020; 9:47am
URL: https://discuss.asciidoctor.org/Do-I-need-an-extension-or-not-for-the-following-use-case-tp7854p7859.html

I was hoping for you to go with the includes option. It's more cumbersome but I prefer out-of-the-box solutions -total personal preference-. The only problem with this I find is obtaining the command name from the section title.

About the extension, I can't really say, but just by process of elimination the Treeprocessor ...
- Preprocessor is the easier, it's only adding AsciiDoc line, but I don't recall includes are processed, you won't have access to the included content unless parsed manually.
- Postprocessor deals with raw output data, fine for HTML, but not for PDF which is binary.
- The other options make no sense to me.

-> Treeprocessors exposes the whole AST, so you have all info available, but you'll have to build the table also using the AST API.