Allow whitespace after commas in ColorList values

This commit is contained in:
Bryan Lee
2025-02-22 20:53:27 +08:00
parent 870b74f4da
commit 7c6375f744

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());
}