diff options
author | Hemmo Nieminen <hemmo.nieminen@iki.fi> | 2022-02-01 00:00:00 +0200 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-06-09 18:58:33 -0400 |
commit | a9e25f4765f410a8263fce8f94c71db40c048bfb (patch) | |
tree | 62f2e30b8c10603b1941df569baa3e47f9540fcb | |
parent | 565b12183f25ce5891ec792ec2ac313c17e259d6 (diff) | |
download | meson-a9e25f4765f410a8263fce8f94c71db40c048bfb.zip meson-a9e25f4765f410a8263fce8f94c71db40c048bfb.tar.gz meson-a9e25f4765f410a8263fce8f94c71db40c048bfb.tar.bz2 |
mlog: add support for italic/emphasized text in AnsiText
-rw-r--r-- | mesonbuild/mlog.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py index d3ef68d..93fd5db 100644 --- a/mesonbuild/mlog.py +++ b/mesonbuild/mlog.py @@ -156,6 +156,9 @@ class AnsiText: def bold(text: str, quoted: bool = False) -> AnsiDecorator: return AnsiDecorator(text, "\033[1m", quoted=quoted) +def italic(text: str, quoted: bool = False) -> AnsiDecorator: + return AnsiDecorator(text, "\033[3m", quoted=quoted) + def plain(text: str) -> AnsiDecorator: return AnsiDecorator(text, "") |