(Markdown) More clearly identify code blocks

This commit is contained in:
2024-04-10 21:32:17 -04:00
parent 0392cf6fea
commit ff10d843ad
+4 -3
View File
@@ -3,7 +3,7 @@ package cli
import "strings" import "strings"
func glamourStyle(styleName string) []byte { func glamourStyle(styleName string) []byte {
hrString := strings.Repeat("─", width) quarterHRString := strings.Repeat("─", width/4)
if styleName == "custom" { if styleName == "custom" {
return []byte(`{}`) // TODO add support for custom color schemes return []byte(`{}`) // TODO add support for custom color schemes
} else if styleName == "gruvbox" { } else if styleName == "gruvbox" {
@@ -64,7 +64,7 @@ func glamourStyle(styleName string) []byte {
}, },
"hr": { "hr": {
"color": "246", "color": "246",
"format": "\n` + hrString + `\n" "format": "\n` + strings.Repeat(quarterHRString, 4) + `\n"
}, },
"item": { "item": {
"block_prefix": "• " "block_prefix": "• "
@@ -99,8 +99,9 @@ func glamourStyle(styleName string) []byte {
"background_color": "236" "background_color": "236"
}, },
"code_block": { "code_block": {
"block_prefix": "` + quarterHRString + "code" + quarterHRString + "\\n" + `",
"block_suffix": "` + strings.Repeat(quarterHRString, 2) + "────\\n" + `",
"color": "248", "color": "248",
"margin": 4,
"chroma": { "chroma": {
"text": { "text": {
"color": "#C4C4C4" "color": "#C4C4C4"