as Markdown State
fun Flow<String>.asMarkdownState(lookupLinks: Boolean = true, retainState: Boolean = false, flavour: MarkdownFlavourDescriptor = GFMFlavourDescriptor(), parser: MarkdownParser = MarkdownParser(flavour), referenceLinkHandler: ReferenceLinkHandler = ReferenceLinkHandlerImpl()): Flow<State>
Transforms a Flow of markdown content strings into a Flow of parsed State for use in non-composable contexts like view models. As soon as the flow is collected, it will start parsing the content, and emit the state once ready.
Return
A Flow of State that represents the parsed markdown state.
Parameters
lookup Links
Whether to lookup links in the parsed tree or not
retain State
Whether to retain the state of the MarkdownState or not, when the input changes
flavour
The MarkdownFlavourDescriptor to use for parsing.
parser
The MarkdownParser to use for parsing.
reference Link Handler
The ReferenceLinkHandler to use for storing links.