Skip to content

Commit 0d319ad

Browse files
committed
util: non-capturing regex
1 parent 3e60a63 commit 0d319ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function replaceCloseCode(str, closeSeq, openSeq, keepClose) {
162162
}
163163

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

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

0 commit comments

Comments
 (0)