Skip to content

Commit 0b696f2

Browse files
committed
util: nits
1 parent 27545d3 commit 0b696f2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/util.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function replaceCloseCode(str, closeSeq, openSeq, keepClose) {
161161
return result + str.slice(lastIndex);
162162
}
163163

164-
// Regex for validating hex color strings (#RGB or #RRGGBB)
164+
// Matches #RGB or #RRGGBB
165165
const hexColorRegExp = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
166166

167167
/**
@@ -258,7 +258,6 @@ function styleText(format, text, options) {
258258
for (const key of formatArray) {
259259
if (key === 'none') continue;
260260

261-
// Check if the key is a hex color string
262261
if (isValidHexColor(key)) {
263262
if (skipColorize) continue;
264263
const { 0: r, 1: g, 2: b } = hexToRgb(key);

0 commit comments

Comments
 (0)