Minor fixes for TOC

This commit is contained in:
2026-04-23 11:03:33 +02:00
parent 4751a99e8e
commit c6a292754f
2 changed files with 5 additions and 6 deletions
+3 -1
View File
@@ -20,7 +20,9 @@
li.className = "toc-" + h.tagName.toLowerCase();
var a = document.createElement("a");
a.href = "#" + h.id;
a.textContent = h.textContent;
var clone = h.cloneNode(true);
clone.querySelectorAll(".btn, .muted").forEach(function (el) { el.remove(); });
a.textContent = clone.textContent.trim();
li.appendChild(a);
list.appendChild(li);
});