parseStream

suspend fun parseStream(markdownStream: Flow<String>)(source)

Processes a stream of Markdown content provided as a flow of strings.

Concatenates chunks of the incoming flow and parses complete sections of Markdown content based on the presence of header or line separators. Each section is then passed to the parser function for processing. Any remaining content in the buffer after all chunks are collected is also processed. Once processing is complete, a handler is invoked to signify the end of parsing.

Parameters

markdownStream

A flow of strings representing chunks of Markdown content to be parsed. These chunks are concatenated and processed into complete sections for handling.