mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-05 17:36:32 +00:00
sgr: parse italic (render not implemented)
This commit is contained in:
@@ -21,6 +21,9 @@ pub const Attribute = union(enum) {
|
||||
/// Bold the text.
|
||||
bold: void,
|
||||
|
||||
/// Italic text.
|
||||
italic: void,
|
||||
|
||||
/// Faint/dim text.
|
||||
faint: void,
|
||||
|
||||
@@ -97,6 +100,8 @@ pub const Parser = struct {
|
||||
|
||||
2 => return Attribute{ .faint = {} },
|
||||
|
||||
3 => return Attribute{ .italic = {} },
|
||||
|
||||
4 => return Attribute{ .underline = {} },
|
||||
|
||||
5 => return Attribute{ .blink = {} },
|
||||
@@ -224,6 +229,11 @@ test "sgr: bold" {
|
||||
try testing.expect(v == .bold);
|
||||
}
|
||||
|
||||
test "sgr: italic" {
|
||||
const v = testParse(&[_]u16{3});
|
||||
try testing.expect(v == .italic);
|
||||
}
|
||||
|
||||
test "sgr: inverse" {
|
||||
{
|
||||
const v = testParse(&[_]u16{7});
|
||||
|
Reference in New Issue
Block a user