www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e67c01ca0bd37462e874e06e12a46143b47693df
parent dfcc8ca0f7d11fa9a4ab3d766e281ca3c560683d
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Fri, 21 Feb 2014 10:53:07 -0500

Merge branch 'issue376' into develop.  Issue #376.

Diffstat:
Munpacked/extensions/toMathML.js | 4++--
Munpacked/jax/element/mml/jax.js | 4++--
Munpacked/jax/input/MathML/jax.js | 2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/unpacked/extensions/toMathML.js b/unpacked/extensions/toMathML.js @@ -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")} diff --git a/unpacked/jax/element/mml/jax.js b/unpacked/jax/element/mml/jax.js @@ -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, diff --git a/unpacked/jax/input/MathML/jax.js b/unpacked/jax/input/MathML/jax.js @@ -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/)) {