Login  Register

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

Posted by mojavelinux on Apr 09, 2020; 10:17am
URL: https://discuss.asciidoctor.org/Is-AST-Document-limited-to-see-blocks-level-1-2-only-tp7858p7861.html

That's also why we have the findBy method:

https://javadoc.io/doc/org.asciidoctor/asciidoctorj-api/latest/org/asciidoctor/ast/StructuralNode.html#findBy-java.util.Map-

See https://github.com/asciidoctor/asciidoctorj/blob/master/README.adoc#reading-the-document-tree

Here's the backing method in the Ruby API: https://www.rubydoc.info/gems/asciidoctor/2.0.9/Asciidoctor/AbstractBlock#find_by-instance_method

Cheers,

-Dan

On Thu, Apr 9, 2020 at 4:01 AM abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Afaik, the structure is a tree, you'll have to traverse recursivity.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Is-AST-Document-limited-to-see-blocks-level-1-2-only-tp7858p7860.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux