Skip to content

Commit 647e3a0

Browse files
Mc expression moved to english fixes, only matches if there are other lowercase letters after the first capital, and can handle Mac as prefix as well. This fixes parsing of Mac names, which are not handle gracefully by ECI as Mc names are.
1 parent 7938390 commit 647e3a0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

addon/synthDrivers/ibmeci.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,16 @@ def unicode(s): return s
4242
re.compile(br"(re|un|non|anti)cosp", re.I): br"\1kosp",
4343
re.compile(br"(EUR[A-Z]+)(\d+)", re.I): br"\1 \2",
4444
re.compile(br"\b(\d+|\W+|[bcdfghjklmnpqrstvwxz]+)?t+z[s]che", re.I): br"\1tz sche",
45-
re.compile(br"\b(juar[aeou]s)([aeiou]{6,})", re.I): br"\1 \2",
46-
# Does not occur in normal use, however if a dictionary entry contains the Mc prefix, and NVDA splits it up, the synth will crash.
47-
# Also fixes ViaVoice, as the parser is more strict there and doesn't like spaces in Mc names.
48-
re.compile(br"\b(Mc) {0,}([A-Z])"): br"\1\2"
45+
re.compile(br"\b(juar[aeou]s)([aeiou]{6,})", re.I): br"\1 \2"
4946
}
5047

5148
english_fixes = {
5249
re.compile(r'(\w+)\.([a-zA-Z]+)'): r'\1 dot \2',
5350
re.compile(r'([a-zA-Z0-9_]+)@(\w+)'): r'\1 at \2',
51+
# Does not occur in normal use, however if a dictionary entry contains the Mc prefix, and NVDA splits it up, the synth will crash.
52+
# Also fixes ViaVoice, as the parser is more strict there and doesn't like spaces in Mc names.
53+
# modified to handle NVDA splitting the mac prefix, which ECI will not handle separately. This should be considered an English fix.
54+
re.compile(r"\b(Ma?c) {1,}([A-Z][a-z]+)"): r"\1\2"
5455
}
5556

5657
french_fixes = { re.compile(r'([a-zA-Z0-9_]+)@(\w+)'): r'\1 arobase \2' }

0 commit comments

Comments
 (0)