Skip to content

Commit 89c4c4c

Browse files
committed
Fix incorrect merge conflict resolution from #653
1 parent 1bbb778 commit 89c4c4c

1 file changed

Lines changed: 4 additions & 22 deletions

File tree

  • ts/core/MmlTree/MmlNodes

ts/core/MmlTree/MmlNodes/mo.ts

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {PropertyList} from '../../Tree/Node.js';
2525
import {AbstractMmlTokenNode, MmlNode, AttributeList, TEXCLASS} from '../MmlNode.js';
2626
import {MmlMrow} from './mrow.js';
2727
import {MmlMover, MmlMunder, MmlMunderover} from './munderover.js';
28-
import {OperatorList, OPTABLE, RangeDef, RANGES, MMLSPACING} from '../OperatorDictionary.js';
28+
import {OperatorList, OPTABLE, getRange, MMLSPACING} from '../OperatorDictionary.js';
2929
import {unicodeChars, unicodeString} from '../../../util/string.js';
3030

3131
/*****************************************************************/
@@ -118,6 +118,9 @@ export class MmlMo extends AbstractMmlTokenNode {
118118
0x201F: 0x2036, // reversed open double quote
119119
};
120120

121+
/**
122+
* Regular expression matching characters that are marked as math accents
123+
*/
121124
protected static mathaccents = new RegExp([
122125
'^[',
123126
'\u00B4\u0301\u02CA', // acute
@@ -433,27 +436,6 @@ export class MmlMo extends AbstractMmlTokenNode {
433436
return forms;
434437
}
435438

436-
/**
437-
* @param {string} mo The character to look up in the range table
438-
* @return {RangeDef} The unicode range in which the character falls, or null
439-
*/
440-
protected getRange(mo: string): RangeDef {
441-
if (!mo.match(/^[\uD800-\uDBFF]?.$/)) {
442-
return null;
443-
}
444-
let n = mo.codePointAt(0);
445-
let ranges = (this.constructor as typeof MmlMo).RANGES;
446-
for (const range of ranges) {
447-
if (range[0] <= n && n <= range[1]) {
448-
return range;
449-
}
450-
if (n < range[0]) {
451-
return null;
452-
}
453-
}
454-
return null;
455-
}
456-
457439
/**
458440
* Mark the mo as a pseudoscript if it is one. True means it is,
459441
* false means it is a pseudo-script character, but in an msup (so needs a variant form)

0 commit comments

Comments
 (0)