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)

git-svn-id: https://mathjax.svn.sourceforge.net/svnroot/mathjax/trunk@576 b8fd5906-0fad-46e2-a0d3-10d94ff285d1
This commit is contained in:
Davide Cervone 2010-08-11 10:44:13 +00:00
parent eef3cbd878
commit b8f04d8326
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.*/,""));