1package common
2
3import (
4 "github.com/charmbracelet/glamour"
5 gansi "github.com/charmbracelet/glamour/ansi"
6)
7
8// StyleConfig returns the default Glamour style configuration.
9func StyleConfig() gansi.StyleConfig {
10 noColor := ""
11 s := glamour.DarkStyleConfig
12 s.Document.StylePrimitive.Color = &noColor
13 s.CodeBlock.Chroma.Text.Color = &noColor
14 s.CodeBlock.Chroma.Name.Color = &noColor
15 // This fixes an issue with the default style config. For example
16 // highlighting empty spaces with red in Dockerfile type.
17 s.CodeBlock.Chroma.Error.BackgroundColor = &noColor
18 return s
19}