From 193a41e78d625765075f652a152366e1e1e17435 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Sat, 21 Mar 2020 22:05:06 -0500 Subject: [PATCH] simplify tag regex --- src/Slugger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Slugger.js b/src/Slugger.js index 147b634e..00f63e48 100644 --- a/src/Slugger.js +++ b/src/Slugger.js @@ -14,7 +14,7 @@ module.exports = class Slugger { .toLowerCase() .trim() // remove html tags - .replace(//g, '') + .replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '') .replace(/\s/g, '-');