MarkdownListToIterable
abstract class MarkdownListToIterable<O, T>(list: ListBlock, inlineValueMapper: (Node) -> T, nestedValueMapper: (Node, ListBlock) -> T) : MarkdownListConverter<O, T, Node>
Abstract helper that converts a Markdown list to a flat (non-keyed) output of type O, by mapping each list item to an element of type T.
Inline and nested list syntaxes are both supported:
Extended:
- :
- valueContent copied to clipboard
(Note that the : character is not mandatory. Any string is valid since it's ignored by the parsing. : is the preferred one.)
Compact:
- - valueContent copied to clipboard
Parameters
O
type of the final converted output
T
type of individual element values in the list
list
list to convert
inlineValueMapper
function that maps the node of a list item to a value. For example, the paragraph node containing file1.txt in - file1.txt
nestedValueMapper