Switch to termenv.EnvColorProfile()

This will allow users to set `NO_COLOR` and `CLICOLOR_FORCE` when they need to override the detected values.
This commit is contained in:
Kenny Parnell 2023-06-30 17:39:57 -04:00 committed by GitHub
parent d1ad453ce6
commit a659534f14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,7 @@ func markdown(input string, theme string) (string, error) {
}
func template(input string) (string, error) {
f := termenv.TemplateFuncs(termenv.ColorProfile())
f := termenv.TemplateFuncs(termenv.EnvColorProfile())
t, err := tpl.New("tpl").Funcs(f).Parse(input)
if err != nil {
return "", fmt.Errorf("unable to parse template: %w", err)