curran / curran/google-diff-match-patch
NewLines appear broken in patches (Python 3, Django 1.6.1)
- Lingua principale
- Python
- Stelle
- 17
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
```
What steps will reproduce the problem?
1. have a change at the end of a line
- from:
some text
more text
- to:
some text with change
more text
2. call
d = dmp.diff_match_patch()
diffs = d.diff_main(text1, text2)
patch = d.patch_make(diffs)
print_me = d.patch_toText(patch)
What is the expected output? What do you see instead?
print_me containts:
+ with change
%0D%0Amore text
it should have contained:
+ with change
more text
What version of the product are you using? On what operating system?
- Python 3.3 x64 on Windows
- Django 1.6.1
- Chrome on Windows
Please provide any additional information below.
I could do a work-around by removing newlines but I have no idea what side
effects I'm introducing:
diffs = d.diff_main(
"".join(text1.splitlines()),
"".join(text2.splitlines())
)
```
Original issue reported on code.google.com by `calistop...@gmail.com` on 22 Jan 2014 at 9:56
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Riproduci il problema con Python 3 su Windows usando diff_main, patch_make e patch_toText su testo contenente una riga modificata seguita da un'interruzione di riga. Confronta l'output codificato della patch con l'output previsto, quindi verifica che la gestione delle interruzioni di riga sia corretta senza compromettere i casi di workaround descritti nel report.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100