class InlineCode extends HTMLElement {
    constructor() {
        super();
        const codeElement = document.createElement("code");
        if (this.hasAttribute("language")) {
            codeElement.classList.add(this.getAttribute("language"));
        } else {
            codeElement.classList.add("language-text");
        }
        codeElement.innerHTML = this.innerHTML;
        this.appendChild(codeElement);
    }
}

customElements.define("jl-code", InlineCode);
