Don't apply hardcoded markup for heading elements

This commit is contained in:
Christian Muehlhaeuser
2019-12-06 00:24:06 +01:00
parent 8cbb296ffb
commit b62a54035e
+1 -3
View File
@@ -1,9 +1,7 @@
package gold package gold
import ( import (
"fmt"
"io" "io"
"strings"
"github.com/muesli/reflow" "github.com/muesli/reflow"
bf "gopkg.in/russross/blackfriday.v2" bf "gopkg.in/russross/blackfriday.v2"
@@ -57,7 +55,7 @@ func (e *HeadingElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer) er
} }
el := &BaseElement{ el := &BaseElement{
Prefix: pre, Prefix: pre,
Token: fmt.Sprintf("%s %s", strings.Repeat("#", node.HeadingData.Level), node.FirstChild.Literal), Token: string(node.FirstChild.Literal),
Style: rules, Style: rules,
} }
err := el.Render(flow, node, tr) err := el.Render(flow, node, tr)