Correct handling of exceptional cases involving legitimate spellings...

...ending in single quote.
This commit is contained in:
Eric S. Raymond 2008-11-03 08:32:35 +00:00
parent 2cc7e6f954
commit 9352e992fc

View file

@ -1199,7 +1199,12 @@ def spellcheck(fn, d):
# Not interested in interpolations or numeric literals
if not lowered or lowered.startswith("$"):
continue
# Suffix handling
# Suffix handling. Done in two passes because some
# Dwrven dialect words end in a single quote
while lowered and lowered[-1] in "_-*).,:;?!& \t":
lowered = lowered[:-1]
if lowered and d.check(lowered):
continue;
while lowered and lowered[-1] in "_-*').,:;?!& \t":
lowered = lowered[:-1]
# Not interested in interpolations or numeric literals