mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-18 20:02:32 +12:00
Merge pull request #1212 from sagev9000/skip-comments-fix
Fix regex for ignoring multi-line comments.
This commit is contained in:
commit
87da52efd4
|
@ -30,7 +30,7 @@ def safeTranslate(qApp, group, text):
|
||||||
return text
|
return text
|
||||||
|
|
||||||
def wordCount(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):
|
def charCount(text, use_spaces = True):
|
||||||
|
|
Loading…
Reference in a new issue