From a9e25f4765f410a8263fce8f94c71db40c048bfb Mon Sep 17 00:00:00 2001 From: Hemmo Nieminen Date: Tue, 1 Feb 2022 00:00:00 +0200 Subject: mlog: add support for italic/emphasized text in AnsiText --- mesonbuild/mlog.py | 3 +++ 1 file changed, 3 insertions(+) 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, "") -- cgit v1.1