summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-12 23:22:14 +0100
committerArmand Philippot <git@armandphilippot.com>2022-02-12 23:22:14 +0100
commit291a4fa29bb7fcbd1e0f298ff27bd0c774ff0cd0 (patch)
tree8e7bba3989e06dc2b163df281d0dccd887e24a22 /src
parentfbd280e9b2bd8ebc1d708a244ef04efd6229bc8f (diff)
chore(toc): exclude comments section for headings list
Diffstat (limited to 'src')
-rw-r--r--src/utils/hooks/useHeadingsTree.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/hooks/useHeadingsTree.tsx b/src/utils/hooks/useHeadingsTree.tsx
index 267e97d..f2be406 100644
--- a/src/utils/hooks/useHeadingsTree.tsx
+++ b/src/utils/hooks/useHeadingsTree.tsx
@@ -11,7 +11,7 @@ const useHeadingsTree = (wrapper: string) => {
useEffect(() => {
const query = depths
- .map((depth) => `${wrapper} > *:not(aside) ${depth}`)
+ .map((depth) => `${wrapper} > *:not(aside, #comments) ${depth}`)
.join(', ');
const result: NodeListOf<HTMLHeadingElement> =
document.querySelectorAll(query);