Class Asciidoctor::ListItem
In: lib/asciidoctor/list.rb
Parent: AbstractBlock

Public: Methods for managing items for AsciiDoc olists, ulist, and dlists.

Methods

compound?   fold_first   new   simple?   text   text=   text?   to_s  

External Aliases

parent -> list
  A contextual alias for the list parent node; counterpart to the items alias on List

Attributes

marker  [RW]  Public: Get/Set the String used to mark this list item

Public Class methods

Public: Initialize an Asciidoctor::ListItem object.

parent - The parent list block for this list item text - the String text (default nil)

Public Instance methods

Check whether this list item has compound content (nested blocks aside from a single outline list). Primarily relevant for outline lists.

Return true if the list item contains blocks other than a single outline list. Otherwise, return false.

Public: Fold the first paragraph block into the text

Here are the rules for when a folding occurs:

Given: this list item has at least one block When: the first block is a paragraph that‘s not connected by a list continuation Or: the first block is an indented paragraph that‘s adjacent (wrapped line) Or: the first block is an indented paragraph that‘s not connected by a list continuation Then: then drop the first block and fold it‘s content (buffer) into the list text

Returns nothing

Check whether this list item has simple content (no nested blocks aside from a single outline list). Primarily relevant for outline lists.

Return true if the list item contains no blocks or it contains a single outline list. Otherwise, return false.

Public: Get the String text of this ListItem with substitutions applied.

By default, normal substitutions are applied to the text. The substitutions can be modified by altering the subs property of this object.

Returns the converted String text for this ListItem

Public: Set the String text.

Returns the new String text assigned to this ListItem

Public: A convenience method that checks whether the text of this list item is not blank (i.e., not nil or empty string).

[Validate]