parseMarkdownFlow

fun parseMarkdownFlow(content: String, lookupLinks: Boolean = true, flavour: MarkdownFlavourDescriptor = GFMFlavourDescriptor(), parser: MarkdownParser = MarkdownParser(flavour), referenceLinkHandler: ReferenceLinkHandler = ReferenceLinkHandlerImpl()): Flow<State>

Creates a kotlinx.coroutines.flow.Flow of 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 kotlinx.coroutines.flow.Flow of State that will emit the parsing state.

Parameters

content

The markdown content to parse.

lookupLinks

Whether to lookup links in the parsed tree or not.

flavour

The MarkdownFlavourDescriptor to use for parsing.

parser

The MarkdownParser to use for parsing.

referenceLinkHandler

The ReferenceLinkHandler to use for storing links.