From 5bb62ff77870432bba634160c60b5926344e8cf9 Mon Sep 17 00:00:00 2001 From: herzs11 <55221264+herzs11@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:07:47 -0500 Subject: [PATCH] Parsing ansi color codes (#4) * Utilize tview's TranslateANSI function to translate ANSI color codes for colorizing output --------- Co-authored-by: Seth Herz --- cmd/core.go | 2 +- src/ui/ui.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/core.go b/cmd/core.go index e3d413a..3d96117 100644 --- a/cmd/core.go +++ b/cmd/core.go @@ -13,7 +13,7 @@ import ( "golang.org/x/term" ) -const version = "0.3.3" +const version = "0.3.4" func completionCommand() *cobra.Command { return &cobra.Command{ diff --git a/src/ui/ui.go b/src/ui/ui.go index 79ca48c..b64b877 100644 --- a/src/ui/ui.go +++ b/src/ui/ui.go @@ -281,7 +281,7 @@ func (ui *UI) evaluateExpression() func() { } } out, _ := program.Run(sb.String()) - ui.OutputView.SetText(out) + ui.OutputView.SetText(tview.TranslateANSI(out)) } }