From cf145123f5b64320ed68db9d71068662ee236751 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Mon, 30 Oct 2023 18:25:49 -0700 Subject: [PATCH] Force rich to use color codes when pretty printing (#1821) --- jrnl/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrnl/output.py b/jrnl/output.py index 0230244bc..48487d402 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -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) + console = Console(width=width, force_terminal=True) with console.capture() as capture: console.print(richtext, sep="", end="") return capture.get()