fix(site): non-unique IDs in code-block
This commit is contained in:
parent
f4e74474c8
commit
82c11ea1d5
2 changed files with 2 additions and 3 deletions
|
@ -5,13 +5,13 @@ class CodeBlockComponent extends HTMLElement {
|
|||
const inline = this.getAttribute("inline") !== null;
|
||||
|
||||
this.innerHTML = `
|
||||
<pre id="pre"><code id="code">${trimmed}</code></pre>
|
||||
<pre><code id="code">${trimmed}</code></pre>
|
||||
`;
|
||||
|
||||
/**
|
||||
* @type {HTMLPreElement}
|
||||
*/
|
||||
const pre = this.querySelector("#pre");
|
||||
const pre = this.querySelector("pre");
|
||||
|
||||
if (lang) {
|
||||
pre.className = `language-${lang}`;
|
||||
|
|
|
@ -64,7 +64,6 @@ customElements.define("my-counter", Counter);
|
|||
</section>
|
||||
</main>
|
||||
<my-footer>
|
||||
<!-- <p>View page <a href="https://github.com/ayoayco/web-component-base/blob/main/site/src/pages/index.html">source code</a></p> -->
|
||||
<span>This site is built with
|
||||
<a href="https://github.com/ayoayco/McFly">McFly</a>, the no-framework framework;
|
||||
</span><br />
|
||||
|
|
Loading…
Reference in a new issue