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
Content copied to clipboard
nothingValueMapper
function that maps an empty value to a value. This is invoked when the entry is in the format:
- key
Content copied to clipboard
T
type of values in the dictionary