Improve titles
This commit is contained in:
parent
2bb2117a59
commit
22f636466e
1 changed files with 4 additions and 1 deletions
|
|
@ -1,2 +1,5 @@
|
|||
export const titleToFragment = (title: string): string =>
|
||||
'#' + encodeURIComponent(title.toLocaleLowerCase().replace(/\W+/g, '-'));
|
||||
'#' +
|
||||
encodeURIComponent(
|
||||
title.toLocaleLowerCase().replace(/&.*?;/g, '').replace(/\W+/g, '-')
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue