From e090b7821a2746dc6be53ff05b3d2458ed5b9f87 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 3 Sep 2014 10:23:10 -0400 Subject: [PATCH] Make SVG output not include emtpy attributes for unknown characters. Issue #898 and mathjax/MathJax-node#6. --- unpacked/jax/output/SVG/jax.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index 32925abd8..6cf59c775 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -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);