From: VonC Date: Fri, 25 Oct 2013 21:18:10 +0000 (+0200) Subject: Uses the right method setAttribute. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d20760f40d377dda29fdc36b5821090ed5c7135b;p=reveal.js.git Uses the right method setAttribute. Works better, and the html elements get their attributes. --- diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index 3b71c42..a36e34f 100755 --- a/plugin/markdown/markdown.js +++ b/plugin/markdown/markdown.js @@ -297,8 +297,8 @@ while( matchesClass = mardownClassRegex.exec( classes ) ) { console.log("attr='" + matchesClass[1] + "'='" + matchesClass[2] + "'"); - element.parentNode.attributes[matchesClass[1]] = matchesClass[2]; - console.log("=>'" + element.parentNode.attributes[matchesClass[1]] + "'"); + element.parentNode.setAttribute(matchesClass[1], matchesClass[2]); + console.log("=>'" + element.parentNode.attributes[matchesClass[1]].nodeValue + "'"); } } }