From 291a4fa29bb7fcbd1e0f298ff27bd0c774ff0cd0 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 12 Feb 2022 23:22:14 +0100 Subject: chore(toc): exclude comments section for headings list --- src/utils/hooks/useHeadingsTree.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/hooks') 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 = document.querySelectorAll(query); -- cgit v1.2.3