015b0b0d17548b5a42b1dc56616cc933f8784c49

Author
Christian Rocha <christian@rocha.is>
Committer
Ayman Bagabas <ayman.bagabas@gmail.com>
Date

Message

chore: de-emphasize Glamour headers

Diff

 1diff --git a/ui/common/style.go b/ui/common/style.go
 2index 1e2c911a79fe31f07f144245667a9459d8091ac1..8b91d9afa08df6466414edaae1bb7da6ad686956 100644
 3--- a/ui/common/style.go
 4+++ b/ui/common/style.go
 5@@ -5,15 +5,23 @@ import (
 6 	gansi "github.com/charmbracelet/glamour/ansi"
 7 )
 8 
 9+func strptr(s string) *string {
10+	return &s
11+}
12+
13 // StyleConfig returns the default Glamour style configuration.
14 func StyleConfig() gansi.StyleConfig {
15-	noColor := ""
16+	noColor := strptr("")
17 	s := glamour.DarkStyleConfig
18-	s.Document.StylePrimitive.Color = &noColor
19-	s.CodeBlock.Chroma.Text.Color = &noColor
20-	s.CodeBlock.Chroma.Name.Color = &noColor
21+	s.H1.BackgroundColor = noColor
22+	s.H1.Prefix = "# "
23+	s.H1.Suffix = ""
24+	s.H1.Color = strptr("39")
25+	s.Document.StylePrimitive.Color = noColor
26+	s.CodeBlock.Chroma.Text.Color = noColor
27+	s.CodeBlock.Chroma.Name.Color = noColor
28 	// This fixes an issue with the default style config. For example
29 	// highlighting empty spaces with red in Dockerfile type.
30-	s.CodeBlock.Chroma.Error.BackgroundColor = &noColor
31+	s.CodeBlock.Chroma.Error.BackgroundColor = noColor
32 	return s
33 }