show color swatches for rgb/hsl with unary + - in numbers

This commit is contained in:
tophf 2018-01-16 15:11:07 +03:00
parent 0fa391732b
commit 1c0cd2da9e

View File

@ -10,7 +10,7 @@
const CLOSE_POPUP_EVENT = 'close-colorpicker-popup';
const RXS_NUM = /\s*(\d+\.?\d*|\d*\.\d+)(?:e[+-]?\d+)?/.source;
const RXS_NUM = /\s*([+-]?(?:\d+\.?\d*|\d*\.\d+))(?:e[+-]?\d+)?/.source;
const RX_COLOR = {
hex: /#(?:[a-f\d]{3}(?:[a-f\d](?:[a-f\d]{2}){0,2})?)\b/iy,