mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
* Remove HTML tag when handling slug, fixed #49 * Fix slugify
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
## 1.5.1
|
||||
### Bug fixes
|
||||
- Remove HTML tag when handling slug
|
||||
|
||||
## 1.5.0
|
||||
|
||||
### Bug fixes
|
||||
|
||||
@@ -117,6 +117,7 @@ export function slugify (string) {
|
||||
if (!maintainCase) string = string.toLowerCase()
|
||||
|
||||
let slug = string.trim()
|
||||
.replace(/<[^>\d]+>/g, '')
|
||||
.replace(re, '')
|
||||
.replace(/\s/g, replacement)
|
||||
let occurrences = slugify.occurrences[slug]
|
||||
|
||||
Reference in New Issue
Block a user