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 // This fixes an issue with the default style config. For example
13 // highlighting empty spaces with red in Dockerfile type.
14 s.Document.StylePrimitive.Color = &noColor
15 s.CodeBlock.Chroma.Text.Color = &noColor
16 s.CodeBlock.Chroma.Name.Color = &noColor
17 return s
18}