ListItem

class ListItem(val variants: List<ListItemVariant> = emptyList(), val children: List<Node>) : 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.

children

content

Constructors

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

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

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