From bb2eaa80ff051f5ec33e34b466073bd5f6f38e7c Mon Sep 17 00:00:00 2001 From: Adam Daniels Date: Mon, 10 Jul 2023 08:10:06 -0400 Subject: [PATCH] fix: don't render bold ANSI sequence when colors are disabled (#515) --- internal/log/log.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/log/log.go b/internal/log/log.go index 4c0342bc..f3e4d383 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -193,6 +193,10 @@ func Gray(s string) string { } func Bold(s string) string { + if !std.colors { + return lipgloss.NewStyle().Render(s) + } + return lipgloss.NewStyle().Bold(true).Render(s) }