add(examples/styles): text and color styling possiblities
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
This also contains some minor refactoring to improve the readability and understandability of the library (i.e. renaming of Style.Attributes to Style.Emphasis).
This commit is contained in:
@@ -3,7 +3,7 @@ const Style = @import("style.zig");
|
||||
|
||||
pub const Cell = @This();
|
||||
|
||||
style: Style = .{ .attributes = &.{} },
|
||||
style: Style = .{ .emphasis = &.{} },
|
||||
// TODO: embrace `zg` dependency more due to utf-8 encoding
|
||||
cp: u21 = ' ',
|
||||
|
||||
@@ -12,7 +12,7 @@ pub fn eql(this: Cell, other: Cell) bool {
|
||||
}
|
||||
|
||||
pub fn reset(this: *Cell) void {
|
||||
this.style = .{ .attributes = &.{} };
|
||||
this.style = .{ .emphasis = &.{} };
|
||||
this.cp = ' ';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user