ListItem

class ListItem(val variants: List<ListItemVariant> = emptyList(), val children: List<Node>, val rawContent: String? = null) : NestableNode

An item of a ListBlock. A list item may be enhanced via ListItemVariants.

Parameters

variants

additional functionalities and characteristics of this item. For example, this item may contain a checked/unchecked task.

rawContent

the raw source content of this item, if available. This is used for value conversion to iterable and dictionary values.

See also

for list-to-value conversion that utilizes the raw content.

Constructors

Link copied to clipboard
constructor(variants: List<ListItemVariant> = emptyList(), children: List<Node>, rawContent: String? = null)

Properties

Link copied to clipboard
open override val children: List<Node>
Link copied to clipboard

The list that owns this item. This property is set by the parser and should not be externally modified.

Link copied to clipboard
val rawContent: String? = null
Link copied to clipboard

Functions

Link copied to clipboard
open override fun <T> accept(visitor: NodeVisitor<T>): T

Accepts a visitor.

Link copied to clipboard

Returns a sequence of all nodes in the tree, where this is the root node. The sequence is generated by traversing the tree in depth-first order. The root node is excluded from the sequence.

Link copied to clipboard

Retrieves the stored media associated with this node, if any.

Link copied to clipboard