Skip to content

Commit

Permalink
Fix highlight h3 in TOC (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashachabin authored Dec 11, 2023
1 parent 088d539 commit 3fcd296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/TableOfContents/TableOfContents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function TableOfContents({ tableOfContentArr, currentPageUrl = [], anchorLinks,
)

useEffect(() => {
const arrayWithAnchorElements = [...document.querySelectorAll('h1[id], h2[id]')]
const arrayWithAnchorElements = [...document.querySelectorAll('h1[id], h2[id], h3[id]')]

const scrollHandler = (entries) =>
entries.forEach((entry) => {
Expand Down

0 comments on commit 3fcd296

Please sign in to comment.