Expand description
Budget-driven text segmentation. The size budget is injected as a fits
predicate, so the caller owns measurement; markdown mode keeps code fences
self-contained across segment boundaries.
Structsยง
- Chunker ๐
Enumsยง
- Cut ๐
- Where the next segment ends.
Functionsยง
- assemble ๐
- Joins the reopened head, body, and an optional closing fence into a segment.
- chunk
- Lazily splits
textusing a monotonicfitspredicate. - discover ๐
- Extends
linesto cover at leastuptolines ofrest, or untilrestis exhausted. Each entry pairs the byte offset past a line with the fence info open after it (markdown mode only). - fence_
line_ ๐info - The info string of a triple-backtick fence line, or
Nonewhen the line is not a fence delimiter. - reopen ๐
- toggle_
fence ๐ - Toggles
fencewhenlineis a code-fence delimiter: an outside delimiter opens a fence carrying its info string, an inside delimiter closes it.
Type Aliasesยง
- Line ๐
- Byte offset past a line, paired with the fence info open after it.