I may be confusing things. We discussed problems with the Levenshtein operator in #11237, and that came down to an incorrect implementation of Levenshtein in diff-match-patch. My extension of the Dice’s Coefficient technique is only an alternative to Levenshtein. I never spent any real time on the other behaviors of diff-match-patch; I have no idea how it finds matching substrings in large text. I assumed it was something similar to Myer’s algorithm, which is used in git. But that’s for finding the most efficient series of edits to convert one string into another, not for finding the closest match to a target within a given source. At some point I’ll dig into the code.