Better sentence spacing

This commit is contained in:
Henk 2022-06-26 20:27:21 +02:00
parent 8cea194809
commit 46678931b2
2 changed files with 2 additions and 2 deletions

View File

@ -300,7 +300,7 @@ class vars:
hascuda = False # Whether torch has detected CUDA on the system
usegpu = False # Whether to launch pipeline with GPU support
custmodpth = "" # Filesystem location of custom model to run
formatoptns = {'frmttriminc': True, 'frmtrmblln': False, 'frmtrmspch': False, 'frmtadsnsp': False, 'singleline': False} # Container for state of formatting options
formatoptns = {'frmttriminc': True, 'frmtrmblln': False, 'frmtrmspch': False, 'frmtadsnsp': True, 'singleline': False} # Container for state of formatting options
importnum = -1 # Selection on import popup list
importjs = {} # Temporary storage for import data
loadselect = "" # Temporary storage for story filename to load

View File

@ -119,7 +119,7 @@ def addsentencespacing(txt, vars):
else:
action = vars.prompt
lastchar = action[-1] if len(action) else ""
if(lastchar == "." or lastchar == "!" or lastchar == "?" or lastchar == "," or lastchar == ";" or lastchar == ":"):
if(lastchar != " "):
txt = " " + txt
return txt