Allow whitespace after commas in ColorList values

pull/5925/head
Bryan Lee 2025-02-22 20:53:27 +08:00
parent 870b74f4da
commit 7c6375f744
No known key found for this signature in database
GPG Key ID: AA996124D88BE937
1 changed files with 3 additions and 1 deletions

View File

@ -4338,7 +4338,9 @@ pub const ColorList = struct {
count += 1;
if (count > 64) return error.InvalidValue;
const color = try Color.parseCLI(raw);
// Trim whitespace from each color value
const trimmed = std.mem.trim(u8, raw, " \t");
const color = try Color.parseCLI(trimmed);
try self.colors.append(alloc, color);
try self.colors_c.append(alloc, color.cval());
}