From 3af5c3d17acf69bc5651614f68ed95e6d1d17375 Mon Sep 17 00:00:00 2001 From: Slavomir Date: Mon, 9 Aug 2021 15:48:32 +0200 Subject: [PATCH] Fix: Check DisableColors in Colorize and ColorizeBG --- text/tools.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/text/tools.go b/text/tools.go index 94b1ae0..65ddb33 100644 --- a/text/tools.go +++ b/text/tools.go @@ -227,11 +227,17 @@ func StringToColorBG(str string) func(string) string { } func Colorize(str string) string { + if DisableColors { + return str + } colorizer := StringToColor(str) return colorizer(str) } func ColorizeBG(str string) string { + if DisableColors { + return str + } colorizer := StringToColorBG(str) return colorizer(str) }