DEV: Fix tag name matching (#26)
This commit is contained in:
parent
8c33f07dc5
commit
ca7fe6b644
|
@ -240,7 +240,7 @@ export default {
|
|||
headings.forEach((heading, subIndex) => {
|
||||
if (subIndex > currentIndex && subIndex < nextIndex) {
|
||||
let subUl = li.lastChild;
|
||||
if (subUl.tagName !== "ul") {
|
||||
if (subUl.tagName !== "UL") {
|
||||
subUl = subUl.appendChild(document.createElement("ul"));
|
||||
subUl.classList.add("d-toc-sublevel");
|
||||
li.appendChild(subUl);
|
||||
|
@ -259,6 +259,7 @@ export default {
|
|||
|
||||
buildItem(node) {
|
||||
let clonedNode = node.cloneNode(true);
|
||||
|
||||
clonedNode.querySelector("span.clicks")?.remove();
|
||||
const li = document.createElement("li");
|
||||
li.classList.add("d-toc-item");
|
||||
|
|
Loading…
Reference in New Issue