Skip to content

Commit 880d71e

Browse files
committed
util: non-capturing regex
1 parent 9af0065 commit 880d71e

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
@@ -161,7 +161,7 @@ function replaceCloseCode(str, closeSeq, openSeq, keepClose) {
161161
}
162162

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

166166
/**
167167
* Validates whether a string is a valid hex color code.

0 commit comments

Comments
 (0)