Minor fixes for TOC
This commit is contained in:
+3
-1
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user