Skip to content

Commit ea39afb

Browse files
authored
Merge pull request #1070 from mathjax/issue3203
Allow unknown characters to use operator table to determine class and node type. (mathjax/MathJax#3203)
2 parents c837e91 + 2382fbf commit ea39afb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ts/core/MmlTree/OperatorDictionary.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ export const RANGES: RangeDef[] = [
140140
* @return {RangeDef} The range containing that character, or null
141141
*/
142142
export function getRange(text: string): RangeDef {
143+
const def = OPTABLE.infix[text] || OPTABLE.prefix[text] || OPTABLE.postfix[text];
144+
if (def) {
145+
return [0, 0, def[2], 'mo'];
146+
}
143147
const n = text.codePointAt(0);
144148
for (const range of RANGES) {
145149
if (n <= range[1]) {

0 commit comments

Comments
 (0)