diff options
author | Clare Macrae <github@cfmacrae.fastmail.co.uk> | 2014-06-29 19:22:31 +0100 |
---|---|---|
committer | Clare Macrae <github@cfmacrae.fastmail.co.uk> | 2014-06-29 19:22:31 +0100 |
commit | 717e16660d1ee83f690b35d0aa9b60c8ac9d6b61 (patch) | |
tree | aa850d4ee99fa0b14da9ba0396ba6aa67e2037e3 /data/MathMLinHTML.js | |
parent | fccfc8429cf4d002df37977f03508c9aae457416 (diff) | |
parent | ce69021e42d7bf50deccba2a52ed4717f6ddac10 (diff) | |
download | pandoc-717e16660d1ee83f690b35d0aa9b60c8ac9d6b61.tar.gz |
Merge remote-tracking branch 'jgm/master' into dokuwiki
Diffstat (limited to 'data/MathMLinHTML.js')
-rw-r--r-- | data/MathMLinHTML.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/data/MathMLinHTML.js b/data/MathMLinHTML.js index ad718cf7e..2ab05c686 100644 --- a/data/MathMLinHTML.js +++ b/data/MathMLinHTML.js @@ -1,4 +1,4 @@ -/* +/* March 19, 2004 MathHTML (c) Peter Jipsen http://www.chapman.edu/~jipsen Released under the GNU General Public License version 2 or later. See the GNU General Public License (at http://www.gnu.org/copyleft/gpl.html) @@ -7,15 +7,15 @@ for more details. function convertMath(node) {// for Gecko if (node.nodeType==1) { - var newnode = + var newnode = document.createElementNS("http://www.w3.org/1998/Math/MathML", node.nodeName.toLowerCase()); for(var i=0; i < node.attributes.length; i++) newnode.setAttribute(node.attributes[i].nodeName, - node.attributes[i].nodeValue); + node.attributes[i].value); for (var i=0; i<node.childNodes.length; i++) { var st = node.childNodes[i].nodeValue; - if (st==null || st.slice(0,1)!=" " && st.slice(0,1)!="\n") + if (st==null || st.slice(0,1)!=" " && st.slice(0,1)!="\n") newnode.appendChild(convertMath(node.childNodes[i])); } return newnode; @@ -37,14 +37,14 @@ function convert() { if (st=="#text") str += node.nodeValue; else { str += (st.slice(0,1)=="/" ? "</m:"+st.slice(1) : "<m:"+st); - if (st.slice(0,1)!="/") + if (st.slice(0,1)!="/") for(var j=0; j < node.attributes.length; j++) - if (node.attributes[j].nodeValue!="italic" && - node.attributes[j].nodeValue!="" && - node.attributes[j].nodeValue!="inherit" && - node.attributes[j].nodeValue!=undefined) + if (node.attributes[j].value!="italic" && + node.attributes[j].value!="" && + node.attributes[j].value!="inherit" && + node.attributes[j].value!=undefined) str += " "+node.attributes[j].nodeName+"="+ - "\""+node.attributes[j].nodeValue+"\""; + "\""+node.attributes[j].value+"\""; str += ">"; } node = node.nextSibling; |