Fix problem with nesting of math delimiters in InternalMath()

This commit is contained in:
Davide P. Cervone 2010-12-09 13:20:44 -05:00
parent 8644056391
commit d504409219
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -1628,13 +1628,13 @@
if (match === '$') {
mml.push(MML.TeXAtom(TEX.Parse(text.slice(k,i-1)).mml().With(def)));
match = ''; k = i;
} else {
} else if (match === '') {
if (k < i-1) {mml.push(this.InternalText(text.slice(k,i-1),def))}
match = '$'; k = i;
}
} else if (c === '\\') {
c = text.charAt(i++);
if (c === '(' && match == '') {
if (c === '(' && match === '') {
if (k < i-2) {mml.push(this.InternalText(text.slice(k,i-2),def))}
match = ')'; k = i;
} else if (c === ')' && match === ')') {