Merge branch 'issue376' into develop. Issue .

This commit is contained in:
Davide P. Cervone 2014-02-21 10:53:07 -05:00
commit e67c01ca0b
3 changed files with 5 additions and 5 deletions
unpacked
extensions
jax
element/mml
input/MathML

View File

@ -38,10 +38,10 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
if (space == null) {space = ""}
var tag = this.type, attr = this.toMathMLattributes();
if (tag === "mspace") {return space + "<"+tag+attr+" />"}
var data = []; var SPACE = (this.isToken ? "" : space+(inferred ? "" : " "));
var data = [], SPACE = (this.isToken ? "" : space+(inferred ? "" : " "));
for (var i = 0, m = this.data.length; i < m; i++) {
if (this.data[i]) {data.push(this.data[i].toMathML(SPACE))}
else if (!this.isToken) {data.push(SPACE+"<mrow />")}
else if (!this.isToken && !this.isChars) {data.push(SPACE+"<mrow />")}
}
if (this.isToken) {return space + "<"+tag+attr+">"+data.join("")+"</"+tag+">"}
if (inferred) {return data.join("\n")}

View File

@ -275,7 +275,7 @@ MathJax.ElementJax.mml.Augment({
SetData: function (i,item) {
if (item != null) {
if (!(item instanceof MML.mbase))
{item = (this.isToken ? MML.chars(item) : MML.mtext(item))}
{item = (this.isToken || this.isChars ? MML.chars(item) : MML.mtext(item))}
item.parent = this;
item.setInherit(this.inheritFromMe ? this : this.inherit);
}
@ -1247,7 +1247,7 @@ MathJax.ElementJax.mml.Augment({
}
});
MML.annotation = MML.mbase.Subclass({
type: "annotation", isToken: true,
type: "annotation", isChars: true,
linebreakContainer: true,
defaults: {
definitionURL: null,

View File

@ -157,7 +157,7 @@
var child = node.childNodes[i];
if (child.nodeName === "#comment") continue;
if (child.nodeName === "#text") {
if (mml.isToken && !mml.mmlSelfClosing) {
if ((mml.isToken || mml.isChars) && !mml.mmlSelfClosing) {
var text = child.nodeValue.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity);
mml.Append(MML.chars(this.trimSpace(text)));
} else if (child.nodeValue.match(/\S/)) {