Skip to content

Commit

Permalink
Make sidebar unicode aware
Browse files Browse the repository at this point in the history
  • Loading branch information
Sporiff committed Feb 23, 2024
1 parent 960fa01 commit 5cbb229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/helpers/toc/getTocHeadings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const getTocHeadings = () => {
const text = heading.textContent;
let slug = text
?.toLocaleLowerCase()
.replace(/\W(?<!\s)/gi, "")
.replace(/\p{P}(?<!\s)/giu, "")
.split(" ")
.join("-")!;

Expand Down

0 comments on commit 5cbb229

Please sign in to comment.