Expand description
Incremental-parse machinery: line-construct classification cache,
damage-diff against the previous buffer snapshot, safe-boundary
widening, and fence-range derivation. Pure functions only — no
pulldown_cmark calls (those live in markdown.rs).
Enums§
- Line
Construct Kind - Coarse classification of a buffer line for safe-boundary widening.
- Widen
Result - Result of widening a damaged range to safe construct boundaries.
Functions§
- compute_
damage_ range - Compute the row range that differs between
oldandnew, with a cursor-row hint to accelerate the common single-character-edit case. - expand_
to_ reset_ boundary - Expand
damagedto the nearest reset boundaries on each side. A reset boundary is a row where pulldown-cmark’s parser state is provably reset (seeParsedBuffer::reset_boundaries), so the returned range is provably equivalent to a fresh parse over the same slice — no post-slice verification needed in release. - fence_
ranges_ from_ kinds - Derive fence-range half-open intervals from the per-line construct
kinds. The view layer uses these to decide which logical rows
render
force_raw(no markdown re-styling, code-block fg color). - widen_
to_ safe - Widen
damagedoutward to safe construct boundaries, applying D5’s +1 extra row and the D4 cap.