GerHobbelt / google-diff-match-patch

Diff, Match and Patch Library (original at http://google.com/p/google-diff-match-patch)
Apache License 2.0
201 stars 58 forks source link

diff_cleanupSemantic not working in python3 port #112

Open DSLituiev opened 8 months ago

DSLituiev commented 8 months ago

The documentation test case silently fails:

from diff_match_patch import diff_match_patch as DMP

dmp = DMP()

x1 = "Good dog"
x2 = "Bad dog"
diffs = dmp.diff_main(x1, x2)
print(diffs)

dmp.diff_cleanupSemantic(diffs)
print(diffs)

both result in [(-1, 'Goo'), (1, 'Ba'), (0, 'd dog')]