class Asciidoctor::ListItem
TODO add these methods to Asciidoctor core
Public Instance Methods
complex?()
click to toggle source
Check whether this list item has complex content (i.e., nested blocks other than an outline list).
Return false if the list item contains no blocks or it contains a nested outline list. Otherwise, return true.
# File lib/asciidoctor-pdf/asciidoctor_ext/list_item.rb, line 6 def complex? !simple? end
simple?()
click to toggle source
Check whether this list item has simple content (i.e., no nested blocks aside from an outline list).
Return true if the list item contains no blocks or it contains a nested outline list. Otherwise, return false.
# File lib/asciidoctor-pdf/asciidoctor_ext/list_item.rb, line 13 def simple? @blocks.empty? || (@blocks.size == 1 && ::Asciidoctor::List === (blk = @blocks[0]) && blk.outline?) end