Quill_markdown.EditSourceTypora-style cursor-aware markdown block segmentation.
Parses a markdown source string into top-level blocks with byte ranges. Consumers use this to render inactive blocks formatted and the active block (containing the cursor) as raw text for editing.
type span = {first : int;Inclusive start byte offset in source (zero-based).
*)last : int;Inclusive end byte offset in source (zero-based).
*)}A byte range within the source string.
A top-level block extracted from a markdown source string.
A parsed markdown source split into blocks with byte ranges.
active_block t ~cursor is the block containing byte offset cursor, or None if cursor is outside all blocks.
block_source t block extracts the raw source substring for block.
block_to_html t block renders block to an HTML fragment.
to_html source renders CommonMark source to an HTML fragment.