minimal performance improvement

This commit is contained in:
OneNewDev 2022-05-28 14:50:00 +02:00
parent ea1763f1f7
commit 425b8588fd

View file

@ -38,9 +38,9 @@ class FileScanner(HTMLParser):
title_words = set(self.file.parent.name.split('-'))
for word in words:
tag_name = word.strip(".,:;!\"'<>()")
word = tag_name.lower()
if not word:
if not tag_name:
continue
word = tag_name.lower()
score = 10
if word in EXCLUDED_WORDS:
score = 0