Skip to content

Commit 2382fbf

Browse files
committed
Allow unknown characters to use operator table rather than ranges to determine TeX class and MathML node type. (mathjax/MathJax#3203)
1 parent f798364 commit 2382fbf

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)