Expand description
Extract (language, body) from a block’s raw text.
A code block in outl is a multi-line bullet whose text is the fenced markdown — opening fence, body, closing fence — preserved verbatim across parse/render cycles. The block text looks like a standard CommonMark fence:
- line 1: triple-backtick + language tag (e.g.
lisp) - line 2..N: the body
- last line: triple-backtick closer
This module is the boundary between “block text as it lives in the AST” and “what the runtime sees” (just the body, plus the language tag). Pure functions, no I/O.
Structs§
- Fence
Parts - What
extract_fencereturns when the block is a code fence.
Functions§
- extract_
fence - Parse the language tag and body out of a block whose first line
opens a fence. Returns
Noneif the text doesn’t start with```— i.e. the block isn’t a code block at all.