Expand description
The per-file replacement engine behind ct-edit: a line-scoped find/replace
that preserves every untouched byte (line terminators, indentation, and
surrounding text) and records the changed lines.
Structs§
- Site
- One line that an edit changed, captured before/after for preview.
Functions§
- edit_
content - Apply
re/replacementto one file’scontent, per line, preserving line terminators and every untouched byte. Returns the new content, the number of occurrences replaced, and the changed lines.literalselects literal replacement (no$capture expansion), used for literal/glob finds.