MarkdownListToCollection

class MarkdownListToCollection<T : OutputValue<*>>(list: ListBlock, inlineValueMapper: (Node) -> T, nestedValueMapper: (ListBlock) -> T) : MarkdownListToValue<IterableValue<T>, T, Node>

Helper that converts a Markdown list to an OrderedCollectionValue.

Parameters

list

list to convert

inlineValueMapper

function that maps the node of a list item a value.

nestedValueMapper

function that maps a nested list to a value. This is invoked when the entry is in any of these formats:

  • Extended:

- :
- value

(Note that the : character is not mandatory. Any string is valid since it's ignored by the parsing. : is the preferred one.)

  • Compact:

- - value
T

type of values in the list

See also

Constructors

Link copied to clipboard
constructor(list: ListBlock, inlineValueMapper: (Node) -> T, nestedValueMapper: (ListBlock) -> T)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard