Skip to content

Commit 9af0065

Browse files
committed
util: nits
1 parent 0f0aa8e commit 9af0065

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
@@ -160,7 +160,7 @@ function replaceCloseCode(str, closeSeq, openSeq, keepClose) {
160160
return result + str.slice(lastIndex);
161161
}
162162

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

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

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

0 commit comments

Comments
 (0)