Merge pull request #1 from lukehsiao-forks/master

fix(index.html): match only on end of path
pull/2/head
Folyd 4 years ago committed by GitHub
commit 72b3c4bc4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -114,7 +114,7 @@
document.querySelectorAll(".toc a").forEach((item) => {
item.classList.remove("active");
});
document.querySelector(".toc a[href='" + pathname + "#" + heading + "']").classList.add("active");
document.querySelector(".toc a[href$='" + pathname + "#" + heading + "']").classList.add("active");
}
let currentHeading = "";
@ -143,4 +143,4 @@
}
</script>
</html>
</html>

Loading…
Cancel
Save