mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-10-01 09:46:30 +13:00
Merge branch 'gtk' into gtk_pull_request
This commit is contained in:
commit
6ce6bb8aff
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
|
|
||||||
from manuskript.util.counter import CounterKind, CharCounter, WordCounter, PageCounter
|
from manuskript.util.counter import CounterKind, CharCounter, WordCounter, PageCounter
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ def countText(text: str, kind: CounterKind = CounterKind.WORDS):
|
||||||
|
|
||||||
|
|
||||||
def safeFraction(value, low, high) -> float:
|
def safeFraction(value, low, high) -> float:
|
||||||
if value < low:
|
if value < low or high <= low:
|
||||||
return 0.0
|
return 0.0
|
||||||
elif value > high:
|
elif value > high:
|
||||||
return 1.0
|
return 1.0
|
||||||
|
|
Loading…
Reference in a new issue