From 0da7c458ea8e0658e4201cda9849286da19717ff Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sun, 28 Dec 2014 15:54:33 -0500 Subject: [PATCH] Don't include attributes that are their defaults in NativeMML output --- unpacked/config/default.js | 2 +- unpacked/jax/output/NativeMML/jax.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/config/default.js b/unpacked/config/default.js index db45cf071..084031af7 100644 --- a/unpacked/config/default.js +++ b/unpacked/config/default.js @@ -510,7 +510,7 @@ MathJax.Hub.Config({ // // This is the amound of indentation (from right or left) for the tags. // - TagIndent: ".8em", + TagIndent: "0.8em", // // This is the width to use for the multline environment diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js index 6fa32af71..2189bee01 100644 --- a/unpacked/jax/output/NativeMML/jax.js +++ b/unpacked/jax/output/NativeMML/jax.js @@ -495,7 +495,7 @@ 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) {tag.setAttribute(id,this.NativeMMLattribute(this[id]))} + if (this[id] != null && this[id] !== defaults[id]) {tag.setAttribute(id,this.NativeMMLattribute(this[id]))} }} } for (var i = 0, m = copy.length; i < m; i++) {