Fix an logic error in stardict.py

This commit is contained in:
Hongbo authored and GitHub committed 2024-03-29 17:32:36 -04:00
1 parent 434dfc28de
commit 8b16f7e62a
1 file changed
+2 -2
+2 -2
View File
@@ -1730,8 +1730,8 @@ class DictHelper (object):
return False return False
if len(word) == 1: if len(word) == 1:
x = ord(word) x = ord(word)
if (x < ord('a')) and (x > ord('z')): if (x < ord('a')) or (x > ord('z')):
if (x < ord('A')) and (x > ord('Z')): if (x < ord('A')) or (x > ord('Z')):
return False return False
if (' ' not in word) and ('-' not in word): if (' ' not in word) and ('-' not in word):
if ('?' in word) or ('!' in word): if ('?' in word) or ('!' in word):