From d20760f40d377dda29fdc36b5821090ed5c7135b Mon Sep 17 00:00:00 2001 From: VonC Date: Fri, 25 Oct 2013 23:18:10 +0200 Subject: [PATCH] Uses the right method setAttribute. Works better, and the html elements get their attributes. --- plugin/markdown/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index 3b71c427..a36e34f5 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 + "'"); } } }