computeHunks() returns Hunk[] (add | del | ctx) with line numbers on the new side for add/ctx and the old side for del. Both inputs are normalized to end with a newline before calling jsdiff's diffLines, otherwise a missing EOF newline is treated as a token boundary and the last line shows up as a spurious del+add pair. |
||
|---|---|---|
| .. | ||
| shared | ||
| index.tsx | ||
| package.json | ||