Closed alexander-riss closed 4 months ago
I figured I'd rather do a breaking release making this change in diffChars
(change already done via https://github.com/kpdecker/jsdiff/pull/500). Diffing UTF-16 code units is a pretty arbitrary and non-useful thing to do and I think it's better to simply have a single diffChars
method that does the useful thing.
the character diff currently does not handle high utf8 like emoji as their length is not calculated correctly. instead of breaking the old characterDiff method we now have a glyphDiff method for this purpose as it may perform worse than the existing method. this PR extends the test suite and passes with 100% coverage