asciidoctor / asciidoctorj

:coffee: Java bindings for Asciidoctor. Asciidoctor on the JVM!
http://asciidoctor.org
Apache License 2.0
618 stars 172 forks source link

1.6.0-RC.1: isBlock() always return true #726

Open arafalov opened 5 years ago

arafalov commented 5 years ago

The documentation does not actually seem to say when it should be true/false, but on my sample document it seems to be always true:

(Style: null, ContentModel: simple, Context: paragraph, Class: BlockImpl, IsBlock: true) (Style: null, ContentModel: compound, Context: dlist, Class: DescriptionListImpl, IsBlock: true) (Style: null, ContentModel: compound, Context: section, Class: SectionImpl, IsBlock: true)

robertpanzer commented 5 years ago

Everything StructuralNode should return true on isBlock(). Only PhraseNodes will return false.

robertpanzer commented 5 years ago

And isBlock() currently throws an Exception when called on a org.asciidoctor.ast.Cell or org.asciidoctor.ast.Column. See github.com/asciidoctor/asciidoctor#2963