diff --git a/src/components/Tutorial.vue b/src/components/Tutorial.vue index ac4d163..da66fa9 100644 --- a/src/components/Tutorial.vue +++ b/src/components/Tutorial.vue @@ -56,6 +56,9 @@ async function getContent() { } function addButton() { + const existing = $content.value?.querySelectorAll(".codeblock-action") ?? [] + for (const el of existing) el.remove() + const action = document.createElement("div") action.className = "codeblock-action" const pres = $content.value?.querySelectorAll("pre") ?? []