Merge remote branch 'dpvc/self-closing-mml'
This commit is contained in:
commit
e66115ec15
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.0.3",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");
|
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.0.4",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
MathJax.InputJax.MathML = MathJax.InputJax({
|
MathJax.InputJax.MathML = MathJax.InputJax({
|
||||||
id: "MathML",
|
id: "MathML",
|
||||||
version: "1.0.3",
|
version: "1.0.4",
|
||||||
directory: MathJax.InputJax.directory + "/MathML",
|
directory: MathJax.InputJax.directory + "/MathML",
|
||||||
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
|
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
|
||||||
entityDir: MathJax.InputJax.directory + "/MathML/entities",
|
entityDir: MathJax.InputJax.directory + "/MathML/entities",
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
var child = node.childNodes[i];
|
var child = node.childNodes[i];
|
||||||
if (child.nodeName === "#comment") continue;
|
if (child.nodeName === "#comment") continue;
|
||||||
if (child.nodeName === "#text") {
|
if (child.nodeName === "#text") {
|
||||||
if (mml.isToken) {
|
if (mml.isToken && !mml.mmlSelfClosing) {
|
||||||
var text = this.trimSpace(child.nodeValue);
|
var text = this.trimSpace(child.nodeValue);
|
||||||
if (mml.isa(MML.mo) && text.length === 1 && this.Remap[text.charAt(0)])
|
if (mml.isa(MML.mo) && text.length === 1 && this.Remap[text.charAt(0)])
|
||||||
{text = this.Remap[text.charAt(0)]}
|
{text = this.Remap[text.charAt(0)]}
|
||||||
|
@ -82,7 +82,11 @@
|
||||||
} else if (child.nodeValue.match(/\S/)) {
|
} else if (child.nodeValue.match(/\S/)) {
|
||||||
MATHML.Error("Unexpected text node: '"+child.nodeValue+"'");
|
MATHML.Error("Unexpected text node: '"+child.nodeValue+"'");
|
||||||
}
|
}
|
||||||
} else {mml.Append(this.MakeMML(child))}
|
} else {
|
||||||
|
var cmml = this.MakeMML(child); mml.Append(cmml);
|
||||||
|
if (cmml.mmlSelfClosing && cmml.data.length)
|
||||||
|
{mml.Append.apply(mml,cmml.data); cmml.data = []}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (MATHML.config.useMathMLspacing) {mml.useMMLspacing = 0x08}
|
if (MATHML.config.useMathMLspacing) {mml.useMMLspacing = 0x08}
|
||||||
return mml;
|
return mml;
|
||||||
|
@ -161,6 +165,9 @@
|
||||||
//
|
//
|
||||||
Startup: function () {
|
Startup: function () {
|
||||||
MML = MathJax.ElementJax.mml;
|
MML = MathJax.ElementJax.mml;
|
||||||
|
MML.mspace.Augment({mmlSelfClosing: true});
|
||||||
|
MML.none.Augment({mmlSelfClosing: true});
|
||||||
|
MML.mprescripts.Augment({mmlSelfClossing:true});
|
||||||
if (window.DOMParser) {
|
if (window.DOMParser) {
|
||||||
this.parser = new DOMParser();
|
this.parser = new DOMParser();
|
||||||
this.ParseXML = this.parseDOM;
|
this.ParseXML = this.parseDOM;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user