use a safe regexp for comments

This commit is contained in:
tophf 2020-10-25 23:44:05 +03:00
parent 2a6850c02e
commit bd3f630617

View File

@ -51,7 +51,7 @@
')', 'gi'); ')', 'gi');
const RX_DETECT_FUNC = /(rgb|hsl)a?\(/iy; const RX_DETECT_FUNC = /(rgb|hsl)a?\(/iy;
const RX_COMMENT = /\/\*[\s\S]*?(?:\*\/|$)/g; const RX_COMMENT = /\/\*([^*]|\*(?!\/))*(\*\/|$)/g;
const SPACE1K = ' '.repeat(1000); const SPACE1K = ' '.repeat(1000);
// milliseconds to work on invisible colors per one run // milliseconds to work on invisible colors per one run