We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bc4dd5 commit 967a6feCopy full SHA for 967a6fe
scripts/utils.js
@@ -16,13 +16,13 @@ const slugify = (text, separator) => {
16
.toString()
17
.toLowerCase()
18
.trim()
19
+ .replace(/[·/_,:;']/g, '-') // Replace unwanted characters with -
20
.replace(/\s+/g, '-') // Replace spaces with -
21
.replace(/&/g, '-and-') // Replace & with 'and'
22
.replace(/[^\w-]+/g, '') // Remove all non-word chars
23
.replace(/-+/g, '-') // Replace multiple - with single -
24
.replace(/^-+/, '') // Trim - from start of text
25
.replace(/-+$/, '') // Trim - from end of text
- .replace(/[·/_,:;']/g, '-') // Replace unwanted characters with -
26
27
if (separator && separator !== '-') {
28
text = text.replace(/-/g, separator)
0 commit comments