mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-09-30 01:07:24 +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 time
|
||||
import traceback
|
||||
|
||||
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:
|
||||
if value < low:
|
||||
if value < low or high <= low:
|
||||
return 0.0
|
||||
elif value > high:
|
||||
return 1.0
|
||||
|
|
Loading…
Reference in a new issue