Skip to content

Commit

Permalink
monograph: remove callout headings from toc (streetwriters#6875) (str…
Browse files Browse the repository at this point in the history
…eetwriters#6993)

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
  • Loading branch information
01zulfi authored Nov 26, 2024
1 parent 986ff32 commit 2462eb1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/monograph/app/components/monographpost/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ function generateTableOfContents() {
let currentHeading = 0;

for (const heading of headings) {
const isCalloutHeading = heading.closest(".callout");
if (isCalloutHeading) {
continue;
}

const text = heading.textContent || "<empty>";
const nodeName = heading.nodeName;
const headingLevel = levelsMap[nodeName];
Expand Down

0 comments on commit 2462eb1

Please sign in to comment.