Skip to content

Commit d72f097

Browse files
committed
Nitpick: re-order boolean word-filter conditions
1 parent d71d399 commit d72f097

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx/search/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def word_filter(self, word: str) -> bool:
117117
"""Return true if the target word should be registered in the search index.
118118
This method is called after stemming.
119119
"""
120-
return not word.isdigit() and word not in self.stopwords
120+
return word and not word.isdigit() not in self.stopwords
121121

122122

123123
# SearchEnglish imported after SearchLanguage is defined due to circular import

0 commit comments

Comments
 (0)