mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Attempt to bypass rich's color removal process when dumping to bash variable
This commit is contained in:
parent
c2a97f3100
commit
26f3af90bb
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:
|
def wrap_with_ansi_colors(text: str, width: int) -> str:
|
||||||
richtext = Text.from_ansi(text, no_wrap=False, tab_size=None)
|
richtext = Text.from_ansi(text, no_wrap=False, tab_size=None)
|
||||||
|
|
||||||
console = Console(width=width)
|
console = Console(width=width, no_color=False)
|
||||||
with console.capture() as capture:
|
with console.capture() as capture:
|
||||||
console.print(richtext, sep="", end="")
|
console.print(richtext, sep="", end="")
|
||||||
return capture.get()
|
return capture.get()
|
||||||
|
|
Loading…
Add table
Reference in a new issue