Skip to content

Commit

Permalink
Merge pull request #1205 from sagev9000/skip-comments-in-word-count
Browse files Browse the repository at this point in the history
Skip comments in word count
  • Loading branch information
TheJackiMonster authored Aug 25, 2023
2 parents 6ee7e88 + f25b471 commit dccfa85
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+", text))
return len(re.findall(r"\S+", re.sub(r"(<!--).+?(-->)", "", text)))


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

0 comments on commit dccfa85

Please sign in to comment.