Skip to content

Commit

Permalink
fixes headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerebrovinny committed Dec 20, 2024
1 parent 3cecc9f commit 58ee415
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pkg/ui/markdown/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ func (r *Renderer) RenderWorkflow(content string) (string, error) {
func (r *Renderer) RenderError(title, details, examples string) (string, error) {
var content string

if title != "" {
content += fmt.Sprintf("# %s\n\n", title)
}

if details != "" {
content += fmt.Sprintf("%s\n\n", details)
}
Expand Down
13 changes: 9 additions & 4 deletions pkg/ui/markdown/styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ var DefaultStyle = []byte(`{
"block_suffix": "\n",
"color": "#00A3E0",
"bold": true,
"margin": 0
"margin": 0,
"style_override": true
},
"h1": {
"prefix": "# ",
"color": "#00A3E0",
"prefix": "",
"color": "#FFFFFF",
"background_color": "#9B51E0",
"bold": true,
"margin": 1
"margin": 2,
"block_prefix": "\n",
"block_suffix": "\n",
"padding": 1
},
"h2": {
"prefix": "## ",
Expand Down

0 comments on commit 58ee415

Please sign in to comment.