mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-09-30 01:07:24 +13:00
Fixes: word count #72
This commit is contained in:
parent
aa536e19dd
commit
4f17ba9090
1 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,9 @@ MW = None
|
||||||
|
|
||||||
|
|
||||||
def wordCount(text):
|
def wordCount(text):
|
||||||
return len(text.strip().replace(" ", "\n").split("\n")) if text else 0
|
t = text.strip().replace(" ", "\n").split("\n")
|
||||||
|
t = [l for l in t if l]
|
||||||
|
return len(t)
|
||||||
|
|
||||||
|
|
||||||
def toInt(text):
|
def toInt(text):
|
||||||
|
|
Loading…
Reference in a new issue