Files
trufflehog/pkg/tui/common/style.go
Amaan Ullah 0fa069c12f Enable errcheck and staticcheck for golangci-lint v2 and resolve all issues (#4924)
* enable errcheck and staticcheck for golangci-lint v2 and resolve all issues

* skip lint on intentional reference of deprecated DetectorType values
2026-05-15 17:07:14 +05:00

29 lines
717 B
Go

package common
import (
gansi "github.com/charmbracelet/glamour/ansi"
"github.com/charmbracelet/glamour/styles"
)
func strptr(s string) *string {
return &s
}
// StyleConfig returns the default Glamour style configuration.
func StyleConfig() gansi.StyleConfig {
noColor := strptr("")
s := styles.DarkStyleConfig
s.H1.BackgroundColor = noColor
s.H1.Prefix = "# "
s.H1.Suffix = ""
s.H1.Color = strptr("39")
s.Document.Color = noColor
s.CodeBlock.Chroma.Text.Color = noColor
s.CodeBlock.Chroma.Name.Color = noColor
// This fixes an issue with the default style config. For example
// highlighting empty spaces with red in Dockerfile type.
s.CodeBlock.Chroma.Error.BackgroundColor = noColor
return s
}