소스 검색

Uses the right method setAttribute.

Works better, and the html elements get their attributes.
VonC 11 년 전
부모
커밋
d20760f40d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      plugin/markdown/markdown.js

+ 2 - 2
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 + "'");
 				}
 			}
 		}