mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-16 02:42:28 +12:00
Fix regex for ignoring multi-line comments.
This commit is contained in:
parent
dccfa85d1f
commit
18089ae44f
|
@ -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"(<!--)[\s\S]+?(-->)", "", text)))
|
||||||
|
|
||||||
|
|
||||||
def charCount(text, use_spaces = True):
|
def charCount(text, use_spaces = True):
|
||||||
|
|
Loading…
Reference in a new issue