Fix problem with nesting of math delimiters in InternalMath()
This commit is contained in:
parent
8644056391
commit
d504409219
File diff suppressed because one or more lines are too long
|
@ -1628,13 +1628,13 @@
|
||||||
if (match === '$') {
|
if (match === '$') {
|
||||||
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-1)).mml().With(def)));
|
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-1)).mml().With(def)));
|
||||||
match = ''; k = i;
|
match = ''; k = i;
|
||||||
} else {
|
} else if (match === '') {
|
||||||
if (k < i-1) {mml.push(this.InternalText(text.slice(k,i-1),def))}
|
if (k < i-1) {mml.push(this.InternalText(text.slice(k,i-1),def))}
|
||||||
match = '$'; k = i;
|
match = '$'; k = i;
|
||||||
}
|
}
|
||||||
} else if (c === '\\') {
|
} else if (c === '\\') {
|
||||||
c = text.charAt(i++);
|
c = text.charAt(i++);
|
||||||
if (c === '(' && match == '') {
|
if (c === '(' && match === '') {
|
||||||
if (k < i-2) {mml.push(this.InternalText(text.slice(k,i-2),def))}
|
if (k < i-2) {mml.push(this.InternalText(text.slice(k,i-2),def))}
|
||||||
match = ')'; k = i;
|
match = ')'; k = i;
|
||||||
} else if (c === ')' && match === ')') {
|
} else if (c === ')' && match === ')') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user