We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0624e59 commit c195d2dCopy full SHA for c195d2d
src/core/render/slugify.js
@@ -4,8 +4,9 @@ const re = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@\[\]^`{|}~]/g
4
export function slugify (str) {
5
if (typeof str !== 'string') return ''
6
7
+ str = /^[\w\s]+$/g.test(str) ? str.toLowerCase() : str
8
+
9
let slug = str
- .toLowerCase()
10
.trim()
11
.replace(/<[^>\d]+>/g, '')
12
.replace(re, '')
0 commit comments