Skip to content

Commit 5137f07

Browse files
committed
util: nits
1 parent 012abfa commit 5137f07

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
@@ -116,7 +116,7 @@ function escapeStyleCode(code) {
116116
return `\u001b[${code}m`;
117117
}
118118

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

122122
/**
@@ -196,7 +196,6 @@ function styleText(format, text, { validateStream = true, stream = process.stdou
196196
for (const key of formatArray) {
197197
if (key === 'none') continue;
198198

199-
// Check if the key is a hex color string
200199
if (isValidHexColor(key)) {
201200
if (skipColorize) continue;
202201
const { 0: r, 1: g, 2: b } = hexToRgb(key);

0 commit comments

Comments
 (0)