]> Lady’s Gitweb - Blog/commitdiff
Add .hljs class to highlighted code
authorLady <redacted>
Thu, 4 May 2023 03:12:11 +0000 (20:12 -0700)
committerLady <redacted>
Thu, 4 May 2023 03:12:11 +0000 (20:12 -0700)
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.02213 seconds and 4 git commands to generate.