Skip to content

Commit

Permalink
fix: improved regex to include other characters
Browse files Browse the repository at this point in the history
  • Loading branch information
shrey committed Jan 10, 2025
1 parent 9792eb9 commit 2195bc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/TOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function TOC({ className, cssBreakingPoint = 'xl', toc, contentSe
// a-namedefinitionsapplicationaapplication slugWithATag contains transformed heading name that is later used
// for scroll spy identification
slugWithATag: item.content
.replace(/[<>?!:`'."\\/=]/gi, '')
.replace(/[<>?!:`'."\\/=*,]/gi, '')
.replace(/\s/gi, '-')
.toLowerCase()
}));
Expand Down

0 comments on commit 2195bc4

Please sign in to comment.