mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Second try to bypass rich's color code suppression
This commit is contained in:
parent
26f3af90bb
commit
6c7d7923e2
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ def format_msg_text(msg: Message) -> Text:
|
|||
def wrap_with_ansi_colors(text: str, width: int) -> str:
|
||||
richtext = Text.from_ansi(text, no_wrap=False, tab_size=None)
|
||||
|
||||
console = Console(width=width, no_color=False)
|
||||
console = Console(width=width, force_terminal=True)
|
||||
with console.capture() as capture:
|
||||
console.print(richtext, sep="", end="")
|
||||
return capture.get()
|
||||
|
|
Loading…
Add table
Reference in a new issue