diff --git a/plugin/gomark/render/html/html.go b/plugin/gomark/render/html/html.go index ca67a52e..e8f4235a 100644 --- a/plugin/gomark/render/html/html.go +++ b/plugin/gomark/render/html/html.go @@ -96,7 +96,7 @@ func (r *HTMLRender) renderCodeBlock(node *ast.CodeBlock) { } func (r *HTMLRender) renderHeading(node *ast.Heading) { - element := fmt.Sprintf("", node.Level) + element := fmt.Sprintf("h%d", node.Level) r.output.WriteString(fmt.Sprintf("<%s>", element)) r.RenderNodes(node.Children) r.output.WriteString(fmt.Sprintf("", element)) diff --git a/plugin/gomark/render/html/html_test.go b/plugin/gomark/render/html/html_test.go index f497af45..d7a3409e 100644 --- a/plugin/gomark/render/html/html_test.go +++ b/plugin/gomark/render/html/html_test.go @@ -18,6 +18,10 @@ func TestHTMLRender(t *testing.T) { text: "Hello world!", expected: `

Hello world!

`, }, + { + text: "# Hello world!", + expected: `

Hello world!

`, + }, { text: "> Hello\n> world!", expected: `
Hello
world!
`,