Skip to content

Commit 404d907

Browse files
committed
util: non-capturing regex
1 parent 5137f07 commit 404d907

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function escapeStyleCode(code) {
117117
}
118118

119119
// Matches #RGB or #RRGGBB
120-
const hexColorRegExp = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
120+
const hexColorRegExp = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
121121

122122
/**
123123
* Validates whether a string is a valid hex color code.

0 commit comments

Comments
 (0)