curran / curran/google-diff-match-patch

Levenshtein maximum distance is greater than length of both strings

Open
#87 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Python
Stars
17
Forks
2
PR merge metrics
No merged PRs in 30d

Description

```

What steps will reproduce the problem?
--------------------------------------
Compute the levenshtein distance between "709113544" and "1555855732":
var dmp = new diff_match_patch();
var diffs = dmp.diff_main("709113544", "1555855732");
var distance = dmp.diff_levenshtein(diffs);

--------------------------------------
What is the expected output?
10 (that's the length of the bigger string)
What do you see instead?
14

--------------------------------------
What version of the product are you using? On what operating system?
Javascript version 20121119. Running in node.js, also reproduced in chrome:
http://plnkr.co/Qgi9q4IyWmguK5mIAMxy
```

Original issue reported on code.google.com by `andersly...@gmail.com` on 22 May 2013 at 7:28

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.