DEV: Fix tag name matching (#26)

This commit is contained in:
Penar Musaraj 2022-01-20 10:53:40 -05:00 committed by GitHub
parent 8c33f07dc5
commit ca7fe6b644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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");