mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-08-28 04:46:29 -04:00
fix(ansi): register chroma styles
termenv changed the order of profiles, now 1 no longer equals ANSI.
This commit is contained in:
committed by
Christian Muehlhaeuser
parent
dc4e563549
commit
50e7d3bab8
+2
-1
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/alecthomas/chroma/quick"
|
||||
"github.com/alecthomas/chroma/styles"
|
||||
"github.com/muesli/reflow/indent"
|
||||
"github.com/muesli/termenv"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -75,7 +76,7 @@ func (e *CodeBlockElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
}
|
||||
theme := rules.Theme
|
||||
|
||||
if rules.Chroma != nil && ctx.options.ColorProfile > 1 {
|
||||
if rules.Chroma != nil && ctx.options.ColorProfile != termenv.Ascii {
|
||||
theme = chromaStyleTheme
|
||||
mutex.Lock()
|
||||
// Don't register the style if it's already registered.
|
||||
|
||||
Reference in New Issue
Block a user