mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-23 08:40:23 +12:00
Fixes: word count #72
This commit is contained in:
parent
aa536e19dd
commit
4f17ba9090
|
@ -17,7 +17,9 @@ MW = None
|
|||
|
||||
|
||||
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):
|
||||
|
|
Loading…
Reference in a new issue