Skip to content

Commit 814045a

Browse files
committed
Make NativeMML output only set attributes when they are not the default (just like toMathML).
1 parent 7ec37f6 commit 814045a

File tree

1 file changed

+4
-2
lines changed
  • unpacked/jax/output/NativeMML

1 file changed

+4
-2
lines changed

unpacked/jax/output/NativeMML/jax.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,10 @@
518518
skip = MML.skipAttributes, copy = MML.copyAttributes;
519519
if (!this.attrNames) {
520520
for (var id in defaults) {if (!skip[id] && !copy[id] && defaults.hasOwnProperty(id)) {
521-
if (this[id] != null && this[id] !== defaults[id])
522-
tag.setAttribute(id,this.NativeMMLattribute(this[id]));
521+
if (this[id] != null && this[id] !== defaults[id]) {
522+
if (this.Get(id,null,1) !== this[id])
523+
tag.setAttribute(id,this.NativeMMLattribute(this[id]));
524+
}
523525
}}
524526
}
525527
for (var i = 0, m = names.length; i < m; i++) {

0 commit comments

Comments
 (0)