Fix problem with single-digit super- and sub-scripts followed by period or comma where the punctuation was considered part of the super-or subscript (reported by Michael Hartl)

This commit is contained in:
dpvc 2010-08-11 10:44:13 +00:00
parent 1d97599631
commit 927eda2d2c
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -1708,7 +1708,7 @@
},
prefilterMath: function (math,displaystyle,script) {
// avoid parsing super- and subscript numbers as a unit
return math.replace(/([_^]\s*\d)(\d)/g,"$1 $2");
return math.replace(/([_^]\s*\d)([0-9.,])/g,"$1 $2");
},
formatError: function (err,math,displaystyle,script) {
return MML.merror(err.message.replace(/\n.*/,""));