diff --git a/spylls/hunspell/algo/permutations.py b/spylls/hunspell/algo/permutations.py index d6e1089..330da67 100644 --- a/spylls/hunspell/algo/permutations.py +++ b/spylls/hunspell/algo/permutations.py @@ -66,7 +66,7 @@ def mapchars_internal(word, start=0): pos = word.find(option, start) if pos != -1: for other in options: - if other == option: + if other == option or word[pos-len(other)+1:].startswith(other): continue replaced = word[:pos] + other + word[pos+len(option):] yield replaced