From a59f47b98ccd53c7bdc0e9ec81ddae779442e827 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Tue, 2 Jul 2024 09:38:35 +0100 Subject: [PATCH] chore(removeScripts): remove redundant regex pattern (#2045) --- plugins/removeScripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/removeScripts.js b/plugins/removeScripts.js index f3e813f3a..de9ddb8cd 100644 --- a/plugins/removeScripts.js +++ b/plugins/removeScripts.js @@ -52,7 +52,7 @@ export const fn = () => { const index = parentNode.children.indexOf(node); const usefulChildren = node.children.filter( - (child) => !(child.type === 'text' && /\s*/.test(child.value)), + (child) => child.type !== 'text', ); parentNode.children.splice(index, 1, ...usefulChildren);