import{highlightElement}from"https://unpkg.com/@speed-highlight/core@1.2.7/dist/index.js";document.addEventListener("DOMContentLoaded",()=>{initSyntaxHighlighting()});async function initSyntaxHighlighting(){try{const e=document.querySelectorAll(".code-example pre code");e.forEach(e=>{let t="html";const s=e.closest(".code-example");if(s){const e=s.querySelector(".code-label");if(e){const n=e.textContent.trim().toLowerCase();n==="css"&&(t="css"),(n==="js"||n==="javascript")&&(t="js"),(n==="go"||n==="golang")&&(t="go"),n==="json"&&(t="json"),n==="http"&&(t="http")}}const n=document.createElement("div");n.className=`shj-lang-${t}`,n.textContent=e.textContent;const o=e.parentElement;o.parentNode.replaceChild(n,o),highlightElement(n,t)})}catch(e){console.warn("Syntax highlighting failed to initialize:",e)}}