Skip to content

Commit 1ef309f

Browse files
committed
Fixes #22 by adding a space if one is missing.
1 parent c0221bd commit 1ef309f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

NVDA-addon/addon/globalPlugins/MathCAT/MathCAT.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ def ConvertSSMLTextForNVDA(text, language=""):
8787
elif m.lastgroup == "phonemeText":
8888
out.append(PhonemeCommand(m.group("ipa"), text=m.group("phonemeText")))
8989
elif m.lastgroup == "content":
90+
# MathCAT puts out spaces between words, but the previous pattern might eat it, so we put it back if needed
91+
if not(m.group(0).startswith(" ")):
92+
out.append(" ")
9093
out.append(m.group(0))
94+
9195
if language:
9296
out.append(LangChangeCommand(None))
9397
return out

0 commit comments

Comments
 (0)