Skip to content

Commit

Permalink
simplify tag regex
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Mar 22, 2020
1 parent 7330a9c commit 193a41e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Slugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '-');
Expand Down

0 comments on commit 193a41e

Please sign in to comment.