From bd3f630617dd78e022319b6e3ae6cadacb36e175 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 25 Oct 2020 23:44:05 +0300 Subject: [PATCH] use a safe regexp for comments --- vendor-overwrites/colorpicker/colorview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor-overwrites/colorpicker/colorview.js b/vendor-overwrites/colorpicker/colorview.js index cf0729f7..3e57758c 100644 --- a/vendor-overwrites/colorpicker/colorview.js +++ b/vendor-overwrites/colorpicker/colorview.js @@ -51,7 +51,7 @@ ')', 'gi'); const RX_DETECT_FUNC = /(rgb|hsl)a?\(/iy; - const RX_COMMENT = /\/\*[\s\S]*?(?:\*\/|$)/g; + const RX_COMMENT = /\/\*([^*]|\*(?!\/))*(\*\/|$)/g; const SPACE1K = ' '.repeat(1000); // milliseconds to work on invisible colors per one run