mirror of
https://github.com/BoostIo/Boostnote
synced 2026-05-27 09:51:56 +00:00
fix toc by sharing slugify()
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
module.exports = function slugify (title) {
|
||||
return encodeURI(title.trim()
|
||||
.replace(/[\]\[\!\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~]/g, '')
|
||||
.replace(/\s+/g, '-'))
|
||||
.replace(/\-+$/, '')
|
||||
}
|
||||
Reference in New Issue
Block a user