Make SVG output not include emtpy attributes for unknown characters. Issue #898 and mathjax/MathJax-node#6.

This commit is contained in:
Davide P. Cervone 2014-09-03 10:23:10 -04:00
parent 56c2da92d5
commit e090b7821a

View File

@ -1006,6 +1006,8 @@
type: "text", removeable: false,
Init: function (scale,text,def) {
if (!def) {def = {}}; def.stroke = "none";
if (def["font-style"] === "") delete def["font-style"];
if (def["font-weight"] === "") delete def["font-weight"];
this.SUPER(arguments).Init.call(this,def);
SVG.addText(this.element,text);
SVG.textSVG.appendChild(this.element);