Merge branch 'gtk' into gtk_pull_request

This commit is contained in:
TheJackiMonster 2023-02-03 15:41:34 +01:00
commit 6ce6bb8aff
No known key found for this signature in database
GPG key ID: D850A5F772E880F9

View file

@ -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