curran / curran/google-diff-match-patch
c# patch_toText + patch_fromText doesn't work
- Vorherrschende Sprache
- Python
- Sterne
- 17
- Forks
- 2
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
```
What steps will reproduce the problem?
1. Run this code with C# version
string text1 = "I like football\nI like baseball";
string text2 = "I like football\nI love baseball";
diff_match_patch dmp = new diff_match_patch();
List diff = dmp.diff_main(text1, text2);
List patchList = dmp.patch_make(diff);
string patchText = dmp.patch_toText(patchList);
List patchList2 = dmp.patch_fromText(patchText);
object[] ob = dmp.patch_apply(patchList2, text1);
string patchedStr = ob[0].ToString();
if (patchedStr != text2)
{
// patch didn't work
}
What is the expected output? What do you see instead?
patchedStr != text2
What version of the product are you using? On what operating system?
downloaded in Sept 2013 from your site. Windows 7.
Please provide any additional information below.
```
Original issue reported on code.google.com by `sswave4d...@hotmail.com` on 25 Sep 2013 at 3:57
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, die gemeldete C#-Reproduktion mit diff_main, patch_make, patch_toText, patch_fromText und patch_apply auszuführen. Vergleiche patchedStr mit text2 und verfolge den Roundtrip der Patch-Serialisierung; das Issue ist erledigt, wenn patch_fromText Patches erzeugt, die patch_apply erfolgreich anwendet, sodass patchedStr gleich text2 ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100