From 8f1a7cd0658ae85e084b557480c576b2624c5a6f Mon Sep 17 00:00:00 2001 From: david catalan Date: Tue, 13 Feb 2024 09:39:03 +0100 Subject: [PATCH] fix: improve comment cleanup regex --- src/utils/DOMUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/DOMUtils.js b/src/utils/DOMUtils.js index f666521d..550a99a4 100644 --- a/src/utils/DOMUtils.js +++ b/src/utils/DOMUtils.js @@ -139,7 +139,7 @@ export default class DOMUtils { // eslint-disable-next-line no-param-reassign document.body.innerHTML = document.body.innerHTML // remove html comments - .replace(/>/gm, '>') + .replace(/(>\s*)/gm, '$1') .replace(/\n/gm, '\n'); }