Preserve case when adding xmlns to <math> element
git-svn-id: https://mathjax.svn.sourceforge.net/svnroot/mathjax/trunk@613 b8fd5906-0fad-46e2-a0d3-10d94ff285d1
This commit is contained in:
parent
be52ea6f7f
commit
fa7820f393
File diff suppressed because one or more lines are too long
|
@ -37,7 +37,7 @@
|
|||
var doc;
|
||||
if (typeof math !== "string") {doc = math.parentNode} else {
|
||||
if (math.match(/^<[a-z]+:/i) && !math.match(/^<[^<>]* xmlns:/))
|
||||
{math = math.replace(/^<([a-z]+):math/i,'<$1:math xmlns:$1="http://www.w3.org/1998/Math/MathML"')}
|
||||
{math = math.replace(/^<([a-z]+)(:math)/i,'<$1$2 xmlns:$1="http://www.w3.org/1998/Math/MathML"')}
|
||||
math = math.replace(/^\s*(?:\/\/)?<!(--)?\[CDATA\[((.|\n)*)(\/\/)?\]\]\1>\s*$/,"$2");
|
||||
math = math.replace(/&([a-z]+);/ig,this.replaceEntity);
|
||||
doc = MATHML.ParseXML(math); if (doc == null) {MATHML.Error("Error parsing MathML")}
|
||||
|
|
Loading…
Reference in New Issue
Block a user