mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-05 08:37:20 -04:00
(Markdown) More clearly identify code blocks
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user