From 82c11ea1d5f2f7bcb96181ed659f54c8e5333691 Mon Sep 17 00:00:00 2001 From: Ayo Date: Fri, 24 Nov 2023 13:23:08 +0100 Subject: [PATCH] fix(site): non-unique IDs in code-block --- site/src/components/code-block.js | 4 ++-- site/src/pages/index.html | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/site/src/components/code-block.js b/site/src/components/code-block.js index 88c5640..84c3d59 100644 --- a/site/src/components/code-block.js +++ b/site/src/components/code-block.js @@ -5,13 +5,13 @@ class CodeBlockComponent extends HTMLElement { const inline = this.getAttribute("inline") !== null; this.innerHTML = ` -
${trimmed}
+
${trimmed}
`; /** * @type {HTMLPreElement} */ - const pre = this.querySelector("#pre"); + const pre = this.querySelector("pre"); if (lang) { pre.className = `language-${lang}`; diff --git a/site/src/pages/index.html b/site/src/pages/index.html index f36ad31..b9f4f52 100644 --- a/site/src/pages/index.html +++ b/site/src/pages/index.html @@ -64,7 +64,6 @@ customElements.define("my-counter", Counter); - This site is built with McFly, the no-framework framework;