diff --git a/components/TOCInline.js b/components/TOCInline.js index f08817865..fa9535083 100644 --- a/components/TOCInline.js +++ b/components/TOCInline.js @@ -34,7 +34,7 @@ const TOCInline = ({ const filteredToc = toc.filter( (heading) => - heading.depth >= fromHeading && heading.depth <= toHeading ** !re.test(heading.value) + heading.depth >= fromHeading && heading.depth <= toHeading && !re.test(heading.value) ) const tocList = (