From b62a54035eb46c3537746ee7984ce9d6c669245a Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 6 Dec 2019 00:24:06 +0100 Subject: [PATCH] Don't apply hardcoded markup for heading elements --- heading.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/heading.go b/heading.go index 8f1cbec..62aea50 100644 --- a/heading.go +++ b/heading.go @@ -1,9 +1,7 @@ package gold import ( - "fmt" "io" - "strings" "github.com/muesli/reflow" 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{ Prefix: pre, - Token: fmt.Sprintf("%s %s", strings.Repeat("#", node.HeadingData.Level), node.FirstChild.Literal), + Token: string(node.FirstChild.Literal), Style: rules, } err := el.Render(flow, node, tr)