Skip to content

Commit

Permalink
Merge pull request #1212 from sagev9000/skip-comments-fix
Browse files Browse the repository at this point in the history
Fix regex for ignoring multi-line comments.
  • Loading branch information
TheJackiMonster authored Sep 5, 2023
2 parents dccfa85 + d149ae4 commit 87da52e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manuskript/functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def safeTranslate(qApp, group, text):
return text

def wordCount(text):
return len(re.findall(r"\S+", re.sub(r"(<!--).+?(-->)", "", text)))
return len(re.findall(r"\S+", re.sub(r"(<!--).+?(-->)", "", text, flags=re.DOTALL)))


def charCount(text, use_spaces = True):
Expand Down

0 comments on commit 87da52e

Please sign in to comment.