diff options
author | VonC <vonc@laposte.net> | 2013-10-25 23:18:10 +0200 |
---|---|---|
committer | VonC <vonc@laposte.net> | 2013-10-27 22:49:42 +0100 |
commit | d20760f40d377dda29fdc36b5821090ed5c7135b (patch) | |
tree | 1e83186908e8d5c64388eea76b2f0b06d260c668 /plugin | |
parent | 0bc3a836fc62a25a72ea46758c82b8617d5e93c0 (diff) | |
download | fosdem-2018-presentation-d20760f40d377dda29fdc36b5821090ed5c7135b.tar fosdem-2018-presentation-d20760f40d377dda29fdc36b5821090ed5c7135b.tar.gz |
Uses the right method setAttribute.
Works better, and the html elements get their attributes.
Diffstat (limited to 'plugin')
-rwxr-xr-x | plugin/markdown/markdown.js | 4 |
1 files changed, 2 insertions, 2 deletions
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 + "'"); } } } |