ListRecognizer

class ListRecognizer(interruption: Interruption, kind: ListKind) : BlockRecognizer

Recognizes a list, ordered or not.

It walks the lines in an explicit loop, because standing at the end of a line its stopping rule decides between ending before that line's terminator, ending after it, and continuing, a three-way outcome no predicate can express.

Parameters

interruption

what ends the list, supplied by the flavor

kind

which bullets open and continue the list

Constructors

Link copied to clipboard
constructor(interruption: Interruption, kind: ListKind)

Properties

Link copied to clipboard

Whether the recognizer only opens at the start of a line.

Functions

Link copied to clipboard
open override fun open(cursor: LineCursor): BlockMatch?