We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f7e199 commit ad83169Copy full SHA for ad83169
lib/markdown/slugify.js
@@ -15,6 +15,8 @@ module.exports = function slugify (str) {
15
.replace(/\-{2,}/g, '-')
16
// Remove prefixing and trailing separtors
17
.replace(/^\-+|\-+$/g, '')
18
+ // ensure it doesn't start with a number (#121)
19
+ .replace(/^(\d)/, '_$1')
20
// lowercase
21
.toLowerCase()
22
}
0 commit comments