Fixed a small problem with reading spaces.

This commit is contained in:
Storm Dragon 2024-03-13 17:15:14 -04:00
parent a84bee851d
commit a8642a6440

View File

@ -27,7 +27,7 @@ class outputManager():
def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=True, brailleAlternative = ''):
if text == '':
return
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'readNumbersAsDigits'):
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'readNumbersAsDigits') and len(text.strip()) > 1:
text = re.sub(r"(\d)", r"\1 ", text).rstrip()
self.env['runtime']['debug'].writeDebugOut("presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO)
if self.playSoundIcon(soundIcon, interrupt):