-
Notifications
You must be signed in to change notification settings - Fork 478
Fix text diffing by replacing 'diff-match-patch' with '@dmsnell/diff-match-patch' #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
And many thanks for a powerful library with an api that actually allowed me to replace this dependency, and also create my own custom formatter with support for text diff patches👍 |
hi @atsjo thank you! is @dmsnell fork published to npm? |
yes it's on npm, so this is a very simple fix: "@dmsnell/diff-match-patch": "^1.1.0" |
fix: switch to @dmsnell/diff-match-patch fix #378
Thanx for the fix @benjamine, and the other fixes as well, I can now also enable moves again:-) Regarding my custom formatter implementation I have opened another issue with an associated PR for a easy way to extend JSONFormatter... |
'diff-match-patch' have issues with surrogate pairs when diffing, you can test it in the live demo by changing:
left
right
Then the diff below disappears and you can see this error in console:
In my own use of jsondiffpatch I have replaced diff-match-patch like this:
and then importing CustomDMP into jsondiffpatch via options...
As a bonus @dmsnell/diff-match-patch is also exported as esm...
The text was updated successfully, but these errors were encountered: