diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-04-21 12:32:57 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-04-21 12:32:57 -0700 |
commit | bf0c7256474a6ac08887f946e4a83e67c7289492 (patch) | |
tree | fb227f3cc6b71c42da54986c9b6bdb2ed589e64e | |
parent | 6a2361c45706c97f6b9ddf2d8f3c6bd2c2c10f19 (diff) | |
parent | 17d105a8a44bbf48e10de10e477c13e0f4388c17 (diff) | |
download | pandoc-bf0c7256474a6ac08887f946e4a83e67c7289492.tar.gz |
Merge pull request #1257 from tarleb/mathmlinhtml-deprecation-warning
MathMLinHTML: Fix deprecation warning
-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; |