Sha256: 7d5f1c64a344646c83b900390a07fb846f3204e71019f05ac7f328f94eeb9395
Contents?: true
Size: 739 Bytes
Versions: 3
Compression:
Stored size: 739 Bytes
Contents
# TODO add these methods to Asciidoctor core class Asciidoctor::ListItem # 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. def complex? !simple? end unless respond_to? :complex? # 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. def simple? @blocks.empty? || (@blocks.size == 1 && ::Asciidoctor::List === (blk = @blocks[0]) && blk.outline?) end unless respond_to? :simple? end
Version data entries
3 entries across 3 versions & 1 rubygems