Skip to main content

Module provenance_builder

Module provenance_builder 

Source
Expand description

Shared run-tiling builder for decoders that walk a decoded string lockstep against the source bytes it came from.

ProvenanceBuilder is the piece of machinery three decoders share (quarto-yaml’s scalar walker, pampa’s div-attribute unescaper, comrak’s CommonMark text path): feed it a sequence of verbatim/replacement calls describing how content bytes were produced from source bytes, and finish() emits a SourceInfo that is contiguous when it safely can be, and a Concat otherwise.

See claude-notes/plans/2026-08-20-provenance-1-foundations.md, § “The shared builder”, for the design this module implements.

Structs§

ProvenanceBuilder
Builds a SourceInfo by tiling a decoded string’s content against the source bytes it came from.