mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 08:57:14 -04:00
Don't apply hardcoded markup for heading elements
This commit is contained in:
+1
-3
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user