This commit is contained in:
Shan Carter
2017-01-03 16:12:45 -08:00
commit b41840ef93
23 changed files with 2375 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import Prism from "prismjs";
export default function(dom, data) {
let codeElements = [].slice.call(dom.querySelectorAll("code"));
codeElements.forEach(el => {
// let content = el.innerHTML;
// el.innerHTML = "";
// let p = dom.createElement("pre");
// let c = dom.createElement("code");
// console.log(content)
let highlighted = Prism.highlightElement(el);
// c.innerHTML = highlighted;
// p.appendChild(c);
// el.appendChild(p);
});
}