-
Notifications
You must be signed in to change notification settings - Fork 1.1k
patch_fromText and lines breaks issue in Python #157
Comments
@weeger did you confirm if this works as expected in the other languages? in JavaScript, Java, Objective C, or any others? |
Same problem, just tested in Javascript :
Result
|
there one thing that stands out: in the broken example we have a patch file where the newline is percent-encoded as makes me wonder if there's something about the |
@dmsnell I just encountered this issue myself. This bug is troublesome. Do you plan to fix it and publish the fix in your improved fork? ( https://github.com/dmsnell/diff-match-patch )? That would be great. Can't believe Google abandoned this project... 😔 |
@Emasoft it's doubtful I'll fix this myself on any timeline someone else wants, but I'm willing to work with people who propose fixes and get it merged. I don't have the capacity do everything myself. |
Lang |
Hello,
I am looking to utilize this fantastic library for applying patches to a file, but I'm encountering issues with broken line breaks. I have attempted to use the patch_make function to compare the behavior, and it operates effectively when the diff is generated by dmp. Could someone please guide me in identifying the potential issues in my diff file?
The wrong result :
The expected one :
This is my simple test code :
And the result
We can clearely see that dmp adds a "%0A" (an encoded \n) in the generated patch, which is missing when creating it from text.
Version info :
The text was updated successfully, but these errors were encountered: