FA-75683 / Text diff and three-way merge / Member archive
Intraline change pairing: removed lines pair with additions after intervening context · case 03
A deletion is highlighted against an unrelated insertion further down.
Case contract
Within each block of consecutive "-" lines immediately followed by consecutive "+" lines, pair the i-th removed line with the i-th added line (extra lines stay unpaired). For each pair report the common prefix length and the common suffix length, where the suffix may not overlap the prefix. Return [old, new, prefix, suffix] rows.
Why this case matters
Word and character highlighting inside changed lines depends on pairing lines and trimming their shared ends.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| pairs do not cross context | [["old", "new", 0, 0]] | [] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗