From 6f6abc6f656c0d86edf5b7bc0e94348ae8c0ddb2 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sat, 19 Aug 2023 21:38:30 -0400 Subject: [PATCH] I think this reads slightly cleaner. --- manuskript/functions/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manuskript/functions/__init__.py b/manuskript/functions/__init__.py index e5a0e6c..525c4fc 100644 --- a/manuskript/functions/__init__.py +++ b/manuskript/functions/__init__.py @@ -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 == '