From 067bd057082165fcc458e22e142b7cb8b224acf4 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Mon, 12 Jul 2010 17:51:23 +0300 Subject: [PATCH] Feature #541 - ASCIMathML.js: Minor corrections about the (latent) ASCIIsvg part of the script. --- main/inc/lib/asciimath/ASCIIMathML.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main/inc/lib/asciimath/ASCIIMathML.js b/main/inc/lib/asciimath/ASCIIMathML.js index cb7e990d1f..4e0dd62f48 100755 --- a/main/inc/lib/asciimath/ASCIIMathML.js +++ b/main/inc/lib/asciimath/ASCIIMathML.js @@ -3416,11 +3416,8 @@ General Public License (at http://www.gnu.org/license/lgpl.html) for more details.*/ // you can change these +var checkIfSVGavailable = true; // Modified by Ivan Tcholakov, 01-JUL-2010. -//var checkIfSVGavailable = true; -var checkIfSVGavailable = false; -// -//Modified by Ivan Tcholakov, 01-JUL-2010. //var notifyIfNoSVG = true; var notifyIfNoSVG = false; // @@ -4701,7 +4698,7 @@ function ASpreprocess() { for (var i=len-1; i>=0; i--) { picture = pictures[i]; var sscr = picture.getAttribute("sscr"); - if (sscr!='') { + if (sscr && sscr!='') { if (noSVG) { n = document.createElement('img'); n.setAttribute("style",picture.getAttribute("style")); @@ -4711,9 +4708,12 @@ function ASpreprocess() { } else { com = parseShortScript(sscr); picture.setAttribute("script",com); - picture.className = "ASCIIsvg"; + //picture.className = "ASCIIsvg"; } } + if (!noSVG) { + picture.className = "ASCIIsvg"; + } } }