summaryrefslogtreecommitdiffstats
path: root/string_matcher.py
diff options
context:
space:
mode:
Diffstat (limited to 'string_matcher.py')
-rw-r--r--string_matcher.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/string_matcher.py b/string_matcher.py
index 543b18f..461f180 100644
--- a/string_matcher.py
+++ b/string_matcher.py
@@ -78,7 +78,7 @@ def matchStrings(old_text: str, new_text: str, window_size = 3) -> str:
for j in range(0, 1 + len(new_text) - window_size):
new_slice = new_text[j:j + window_size]
cur_d = editdistance.eval(old_slice, new_slice)
- if cur_d <= best_match_d:
+ if cur_d < best_match_d:
best_match_i = i
best_match_j = j
best_match_d = cur_d