fix: replace . with - in slugs (#39168)

This commit is contained in:
Oliver Eyton-Williams
2020-07-03 16:58:53 +02:00
committed by GitHub
parent 7ed1d52001
commit 52ecb14b0f
2 changed files with 7 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ exports.dasherize = function dasherize(name) {
return ('' + name)
.toLowerCase()
.trim()
.replace(/\s/g, '-')
.replace(/\s|\./g, '-')
.replace(/[^a-z\d\-.]/g, '');
};