Merge branch 'issue912' into develop. Issue #912.

This commit is contained in:
Davide P. Cervone 2014-09-14 09:20:23 -04:00
commit fe06c828b4
2 changed files with 3 additions and 4 deletions

View File

@ -59,11 +59,9 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
if (!this.attrNames) {
if (this.type === "mstyle") {defaults = MML.math.prototype.defaults}
for (var id in defaults) {if (!skip[id] && defaults.hasOwnProperty(id)) {
var force = (id === "open" || id === "close" || id === "form");
if (this[id] != null && (force || this[id] !== defaults[id])) {
if (this[id] != null && this[id] !== defaults[id]) {
var value = this[id]; delete this[id];
if (force || this.Get(id) !== value)
{attr.push(id+'="'+this.toMathMLattribute(value)+'"')}
if (this.Get(id) !== value) {attr.push(id+'="'+this.toMathMLattribute(value)+'"')}
this[id] = value;
}
}}

View File

@ -221,6 +221,7 @@ MathJax.ElementJax.mml.Augment({
},
skipAttributes: {texClass: true, useHeight: true, texprimestyle: true},
copyAttributeNames: [
"displaystyle", "scriptlevel", "open", "close", "form", // force these to be copied
"fontfamily", "fontsize", "fontweight", "fontstyle",
"color", "background",
"id", "class", "href", "style"