Expand description
Apply a parsed list of Edits to a text body and return the post-edit
text plus diagnostic warnings.
Replacement groups are first normalized by boundary repair, which absorbs common model mistakes where a payload restates unchanged range boundaries or duplicates/drops structural closers. After-insert landings are then corrected when a body’s indentation claims a depth different from its anchor’s.
Ported from omp packages/hashline/src/apply.ts.
Functions§
- apply_
edits - Apply a parsed list of
Edits totext. Pure function — no I/O.