Re: Create section in block macro
Posted by
David Jencks on
URL: https://discuss.asciidoctor.org/Create-section-in-block-macro-tp8127p8131.html
It’s also possible to add the section immediately and use a tree processor to reset the section levels correctly. I think it’s important to preserve the order of the blocks, and this strategy makes that easier in my opinion. I have implemented this in
asciidoctor-ainclude, where the added sections are in isolated sub-documents. My experience was that getting the algorithm to reset section levels to work was tricky.
On Jul 31, 2020, at 4:01 AM, dalai [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
Thanks, that's what I thought based on the observed behavior.
I am not sure my use case deserves a change to the parser behavior. I will need to create the parent section outside my macro but that is not a big problem.