sdiff: implement the `|` marker for changed lines
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
Start in src/side_diff.rs and trace how the current engine diff’s Left, Right, and Both results are consumed. Verify the change with the provided diff -y example, including a hunk with unequal deletion and insertion counts. Done means positional pairs in each contiguous change hunk print with |, while leftovers retain < or > and unchanged lines remain unaffected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
src/side_diff.rs currently emits only <, > and blank gutters. Lines that exist in both files but differ are printed as a separate deletion and insertion instead of a single row with |.
The | is produced at print time, by pairing positionally inside a contiguous change hunk. For a run of N deletions and M insertions, the first min(N, M) are printed as pairs with |, and the leftovers keep < or >. The pairing is positional, so the two lines of a | row need nothing in common:
$ diff -y --width=40 L R # L: a,b1,b2,b3,c R: a,X,c
a a
b1 | X
b2 <
b3 <
c c
So the change is confined to the consumption of the current engine diff's. Buffer the run of Left/Right results, and on the next Both (or at EOF) flush it with the pairing above.
- Lingua principale
- Rust
- Stelle
- 276
- Fork
- 39
- Merge medio
- 3h 27m
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di uutils/diffutils
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 64/100
Tutte le issue di uutils/diffutils
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100