Josh-Miller / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Apache License 2.0
0 stars 0 forks source link

Pattern too long for this browser #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
     var dmp = new diff_match_patch();
     var last = 'abcdefghij , h : 1 , t : 1 abcdefghij , h : 1 , t :
1 abcdefghij , h : 0 , t : 1';
     var current = 'abcdefghij , h : 0 , t : 1 abcdefghij , h : 0
, t : 1 abcdefghij , h : 0 , t : 1';
     var patches = dmp.patch_make(current, last);
     var mod_current = 'abcdefghij , h : 0 , t : 1 abcdefghij , h : 1
, t : 1 abcdefghij , h : 0 , t : 1';
     var res = dmp.patch_apply(patches, mod_current);

What is the expected output? What do you see instead?
Expect patch to succeed or fail.  Actually it throws an error "Pattern too
long for this browser".  Only affects JavaScript version (the bug is also
in the Python version but is never expressed).

Fathei Ali reported this error and I tracked it down to an indexing bug in
patch_splitMax.  Most of the time this would have no effect, but very
occasionally it fails to split a long patch.

A new version has been pushed which corrects this bug and unit tests have
been added in all languages for verification.

Original issue reported on code.google.com by neil.fra...@gmail.com on 4 Dec 2008 at 5:50

GoogleCodeExporter commented 9 years ago

Original comment by neil.fra...@gmail.com on 4 Dec 2008 at 5:51

GoogleCodeExporter commented 9 years ago
Issue 24 has been merged into this issue.

Original comment by neil.fra...@gmail.com on 7 Sep 2009 at 12:45