I think this reads slightly cleaner.

This commit is contained in:
Sage Vaillancourt 2023-08-19 21:38:30 -04:00
parent 80e90b5ddc
commit 6f6abc6f65

View file

@ -34,10 +34,9 @@ def wordCount(text):
count = 0
in_comment = False
for word in words:
if in_comment:
if word == '-->':
in_comment = False
else:
if in_comment and word == '-->':
in_comment = False
if not in_comment:
if word == '<!--':
in_comment = True
else: