commit e090b7821a2746dc6be53ff05b3d2458ed5b9f87
parent 56c2da92d5c3221a052a63c66fd26c199263b8c6
Author: Davide P. Cervone <dpvc@union.edu>
Date: Wed, 3 Sep 2014 10:23:10 -0400
Make SVG output not include emtpy attributes for unknown characters. Issue #898 and mathjax/MathJax-node#6.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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);