diff --git a/src/style.zig b/src/style.zig index d14ea5a..21ac0a7 100644 --- a/src/style.zig +++ b/src/style.zig @@ -34,7 +34,7 @@ pub const Emphasis = enum(u8) { strikethrough, }; -fg: Color = .white, +fg: Color = .default, bg: Color = .default, ul: Color = .default, ul_style: Underline = .off, @@ -63,7 +63,7 @@ pub fn value(this: Style, writer: anytype, cp: u21) !void { for (this.emphasis) |attribute| try std.fmt.format(writer, ";{d}", .{@intFromEnum(attribute)}); try std.fmt.format(writer, "m", .{}); // content - try std.fmt.format(writer, "{s}", .{buffer}); + try std.fmt.format(writer, "{s}", .{buffer[0..bytes]}); try std.fmt.format(writer, "\x1b[0m", .{}); }