]> Lady’s Gitweb - Blog/blobdiff - build.js
Add .hljs class to highlighted code
[Blog] / build.js
index 641bd94a3a2983b4d9f28a6b8fd6883a3fbe31cc..d4e5d710814fc009ee38b208d4d242c5a293c9d7 100755 (executable)
--- a/build.js
+++ b/build.js
@@ -39,6 +39,10 @@ const applyHighlighting = (node) => {
           `<!DOCTYPE html><html><body>${highlight}</body></html>`,
           "text/html",
         ).documentElement.lastChild.childNodes;
+        code.setAttribute(
+          "class",
+          `hljs ${code.getAttribute("class")}`,
+        );
         code.textContent = "";
         for (const node of Array.from(nodes)) {
           code.appendChild(code.ownerDocument.importNode(node, true));
This page took 0.030905 seconds and 4 git commands to generate.