From 5654eaf78018e8c41c33aa62a58a461078a972bc Mon Sep 17 00:00:00 2001 From: Gustavo Perenciolo Date: Mon, 18 Mar 2019 13:53:40 -0300 Subject: [PATCH] Fix #1267 no support to #RRGGBBAA CSS 4 hex color --- lib/helpers.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index 68e45fd4..5fe25c42 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -182,10 +182,7 @@ helpers.isHyphenatedBEM = function (str) { }; helpers.isValidHex = function (str) { - if (str.match(/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)) { - return true; - } - return false; + return /^([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{4}|[a-f0-9]{3})$/i.test(str); }; /**