mirror of
https://github.com/markedjs/marked
synced 2024-11-23 01:38:57 +00:00
simplify tag regex
This commit is contained in:
parent
7330a9ca3d
commit
193a41e78d
@ -14,7 +14,7 @@ module.exports = class Slugger {
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
// remove html tags
|
||||
.replace(/<!?\/?[\w-]+(?: .*)?\/?>/g, '')
|
||||
.replace(/<[!\/a-z].*?>/ig, '')
|
||||
// remove unwanted chars
|
||||
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '')
|
||||
.replace(/\s/g, '-');
|
||||
|
Loading…
Reference in New Issue
Block a user