Provide notty style to glamour when colors are disabled.

This commit is contained in:
Brett Buddin 2020-04-02 21:09:29 -04:00
parent 48e7df2337
commit 0cc41b4912
No known key found for this signature in database
GPG key ID: C51265E441C4C5AC

View file

@ -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 {