Expand description
Line-level and character-level diff computation with hunk mapping and side-by-side view support.
Structs§
- Byte
Range - Byte range reference into an original or new text.
- Diff
Hunk - Group of contiguous changes with surrounding context lines.
- Diff
Line - One line in a diff result with its operation and source ranges.
- Diff
Result - Result of a line-level diff computation.
- Intra
Line Diff - Character-level diff result for one line pair.
- Intra
Line Range - Character-level diff range within a single line.
- Side
BySide Line - Side-by-side diff row pairing left and right lines.
- Side
Line - One side of a side-by-side diff row.
Enums§
- DiffOp
- Diff operation kind.
Functions§
- diff
- Compute a line-level diff between two texts using the Myers O(ND) algorithm.
- diff_
intra_ line - Compute a character-level diff between two lines.
- diff_
to_ patches - Convert a diff result to a list of
TextPatchvalues that can be applied to the old text. - to_
side_ by_ side - Convert a diff result to side-by-side display rows.