Expand description
Line-level hunk diff โ a faithful port of line-diff.ts.
The originals roll their own LCS with a load-bearing tie-break
(lcs[i+1][j] >= lcs[i][j+1] โ prefer removed); we port it directly so
the emitted op stream matches byte-for-byte. Hunks expand context_lines
around each change and merge when adjacent.
Functionsยง
- build_
line_ hunks - Build line-level hunks between two texts, with
context_linesof context around each change. Returns an empty vec when the texts are identical. - build_
line_ hunks_ default - Convenience matching the TS default of 3 context lines.