Diff
google-diff-match-patch Example
@@ -1,15 +1,21 @@ one%0Atwo + trees %0Athree%0Af @@ -6,13 +6,20 @@ wo%0Athree + houses %0Afour
PatchesSource
one two trees three four
TextB
one two three four
TextA
one two three houses four
TextC
one two trees three houses four
TextD
[[0,"one\ntwo\nthree"],[1," houses"],[0,"\nfour"]]
[[0,"one\ntwo"],[1," trees"],[0,"\nthree\nfour"]]
one two trees three four
TextBDiff
one two three houses four
TextCDiff
patches = dmp.patch_fromText(source) result = dmp.patch_apply(patches, a)
diffs1 = dmp.diff_lineMode(a,b)
patch1 = dmp.patch_make(diffs1) patch2 = dmp.patch_make(diffs2) patchText = dmp.patch_toText(patch1.concat(patch2));
diffs2 = dmp.diff_lineMode(a,c)