Provide notty style to glamour when colors are disabled.
This commit is contained in:
parent
48e7df2337
commit
0cc41b4912
1 changed files with 5 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue