Skip to content

Commit 0645ea4

Browse files
committed
OK if a word == a prefix
1 parent 92ea09b commit 0645ea4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

codespell.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ def spell_check_file(filename, spell_checker, mimetype='',
7575
#
7676
for pre in prefixes:
7777
if error.word.startswith(pre):
78+
79+
# check if the word is only the prefix
80+
if len(pre) == len(error.word):
81+
continue
82+
83+
# remove the prefix
7884
wrd = error.word[len(pre):]
7985
if output_lvl > 1:
8086
print("Trying without prefix: ", error.word, wrd)

0 commit comments

Comments
 (0)