diff --git a/unpacked/jax/input/MathML/jax.js b/unpacked/jax/input/MathML/jax.js index 2b6d9e877..08fffba94 100644 --- a/unpacked/jax/input/MathML/jax.js +++ b/unpacked/jax/input/MathML/jax.js @@ -140,10 +140,11 @@ if (name.match(/^_moz-math-((column|row)(align|line)|font-style)$/)) continue; var value = node.attributes[i].value; value = this.filterAttribute(name,value); + var defaults = (mml.type === "mstyle" ? MML.math.prototype.defaults : mml.defaults); if (value != null) { if (value.toLowerCase() === "true") {value = true} else if (value.toLowerCase() === "false") {value = false} - if (mml.defaults[name] != null || MML.copyAttributes[name]) + if (defaults[name] != null || MML.copyAttributes[name]) {mml[name] = value} else {mml.attr[name] = value} mml.attrNames.push(name); } diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index 4d0a267f4..99e68dcb6 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -490,10 +490,9 @@ // and set those in the tag's attribute list // NativeMMLattributes: function (tag) { - var defaults = this.defaults; + var defaults = (this.type === "mstyle" ? MML.math.prototype.defaults : this.defaults); var copy = (this.attrNames||MML.copyAttributeNames), skip = MML.skipAttributes; if (!this.attrNames) { - if (this.type === "mstyle") {defaults = MML.math.prototype.defaults} for (var id in defaults) {if (!skip[id] && defaults.hasOwnProperty(id)) { if (this[id] != null && this[id] !== defaults[id]) {tag.setAttribute(id,this.NativeMMLattribute(this[id]))} }}