Fix color regexp to not match 7 hex digit
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ import {clamp} from './math.js';
|
|||||||
* @type {RegExp}
|
* @type {RegExp}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
const HEX_COLOR_RE_ = /^#(?:[0-9a-f]{3,4}){1,2}$/i;
|
const HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user