Login  Register

Is AST Document limited to see blocks - level 1,2 only

Posted by ch007m on Apr 09, 2020; 9:44am
URL: https://discuss.asciidoctor.org/Is-AST-Document-limited-to-see-blocks-level-1-2-only-tp7858.html

Hi,

When we develop a Java extension for Asciidoctor using the TreeProcessor, then the following code (see hereafter) only sees the sections level 2 and not level 3, 4 (=== level, ...).
Do we have to specify a parameter to enable that and get them with the method "block.getBlocks()" ?

Code
@Override
    public Document process(Document document) {
        processBlock((StructuralNode) document);
        return document;
    }

    private void processBlock(StructuralNode block) {
        List<StructuralNode> blocks = block.getBlocks(); // WE ONLY GOT LEVEL 2

Regards

Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard