diff options
author | Micah Jerome Ellison <micah.jerome.ellison@gmail.com> | 2023-10-30 18:25:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 18:25:49 -0700 |
commit | cf145123f5b64320ed68db9d71068662ee236751 (patch) | |
tree | 3caffa2240fd52451ae09f3bebcdbb0c10b75106 | |
parent | c2a97f31007734cd42a28c3f1166bc1198e9fa14 (diff) |
Force rich to use color codes when pretty printing (#1821)
-rw-r--r-- | jrnl/output.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jrnl/output.py b/jrnl/output.py index 0230244b..48487d40 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() |