diff --git a/vendor-overwrites/colorpicker/colorview.js b/vendor-overwrites/colorpicker/colorview.js index 8b695767..54a6d024 100644 --- a/vendor-overwrites/colorpicker/colorview.js +++ b/vendor-overwrites/colorpicker/colorview.js @@ -40,11 +40,11 @@ !CSS.supports('color', 'hsl(1turn, 2%, 3%)') && /deg|g?rad|turn/, ].filter(Boolean).map(rx => rx.source).join('|') || '^$', 'i'), }; - const RX_DETECT = new RegExp('(^|[\\s():,/])' + + const RX_DETECT = new RegExp('(^|[\\s(){}[\\]:,/"=])' + '(' + RX_COLOR.hex.source + '|' + '(?:rgb|hsl)a?(?=\\()|(?:' + [...colorConverter.NAMED_COLORS.keys()].join('|') + ')' + - '(?=[\\s;()/]|$)' + + '(?=[\\s;(){}[\\]/"]|$)' + ')', 'gi'); const RX_DETECT_FUNC = /(rgb|hsl)a?\(/iy;