static: fix dashes being removed from slugs
This commit is contained in:
parent
5400882d78
commit
e1f0fe45cb
|
@ -41,8 +41,8 @@ document.querySelectorAll(".codemirror").forEach((cm) => {
|
|||
const convertToSlug = (text) => {
|
||||
return text
|
||||
.toLowerCase()
|
||||
.replace(/[^\w ]+/g, '')
|
||||
.replace(/ +/g, '-');
|
||||
.replace(/ /g, '-')
|
||||
.replace(/[^\w-]+/g, '');
|
||||
};
|
||||
|
||||
document.querySelectorAll("input[name=name]").forEach((input) => {
|
||||
|
|
Reference in New Issue