MarkdownListToDictionary

class MarkdownListToDictionary<T : OutputValue<*>>(list: ListBlock, inlineValueMapper: (String) -> T, nestedValueMapper: (ListBlock) -> T, nothingValueMapper: () -> T) : MarkdownListToValue<DictionaryValue<T>, Pair<String, T>, TextNode>

Helper that converts a Markdown list to a DictionaryValue.

Parameters

list

list to convert

inlineValueMapper

function that maps a raw string to a value. This is invoked when the entry is in a - key: value format.

nestedValueMapper

function that maps a nested list to a value. This is invoked when the entry is in the format:

- key
- value
nothingValueMapper

function that maps an empty value to a value. This is invoked when the entry is in the format:

- key
T

type of values in the dictionary

See also

Constructors

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

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard