Skip to content

Commit

Permalink
fix: remove commas from fragment URLs (#3634)
Browse files Browse the repository at this point in the history
Co-authored-by: Ansh Goyal <anshgoyal1704@gmail.com>
  • Loading branch information
Shriya-Chauhan and anshgoyalevil authored Feb 1, 2025
1 parent 8423e96 commit f0e6ca9
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 f0e6ca9

Please sign in to comment.