Skip to content

Commit 6f73e20

Browse files
htunnicliffQix-
authored andcommittedJul 17, 2021
Update HSL regular expression
1 parent 0264546 commit 6f73e20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ cs.get.hsl = function (string) {
129129
return null;
130130
}
131131

132-
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
132+
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/;
133133
var match = string.match(hsl);
134134

135135
if (match) {

0 commit comments

Comments
 (0)
Please sign in to comment.