From 0cc41b4912949479f106bd8e99e9407d42994488 Mon Sep 17 00:00:00 2001 From: Brett Buddin Date: Thu, 2 Apr 2020 21:09:29 -0400 Subject: [PATCH] Provide notty style to glamour when colors are disabled. --- utils/utils.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index 4510db793..045faca2c 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -22,7 +22,11 @@ func OpenInBrowser(url string) error { } func RenderMarkdown(text string) (string, error) { - return glamour.Render(text, "dark") + style := "notty" + if isColorEnabled() { + style = "dark" + } + return glamour.Render(text, style) } func Pluralize(num int, thing string) string {