Skip to main content

Module markdown

Module markdown 

Source
Expand description

Line-based markdown scanning: fenced code blocks with info tags, and <!-- soothfast:... --> markers. Deliberately not a markdown AST — we need fences and comment markers only (dependency policy: no pulldown-cmark).

Structs§

Bind
<!-- soothfast:bind path::to::item -->
ClaimMarker
<!-- soothfast:claim item.backend.metric < value -->
CodeBlock
One fenced code block.
Doc
Everything scan extracts from one markdown file: fenced code blocks plus soothfast:bind / soothfast:claim markers, in document order.

Functions§

scan
Scan one markdown text. Closing markers (<!-- /soothfast:... -->) are structural for readers and ignored here. Errs on an unclosed fence: dropping it would silently swallow the block and every later marker.
splice_output
Replace (or insert) the text soothfast-output fence that follows the nth capture-output block (0-based among capture blocks). Ok(None) when the capture block wasn’t found; Err on malformed markdown.