From 6f73e205202c95ba7e6fd5afdffedd4552579a38 Mon Sep 17 00:00:00 2001 From: Hunter Tunnicliff Date: Sat, 17 Jul 2021 03:43:29 +0000 Subject: [PATCH] Update HSL regular expression --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 25fba85..e8388c2 100644 --- a/index.js +++ b/index.js @@ -129,7 +129,7 @@ cs.get.hsl = function (string) { return null; } - var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; + var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hsl); if (match) {