Drop redundant DocumentElement

This commit is contained in:
Christian Muehlhaeuser
2019-12-13 03:05:55 +01:00
parent 35342a2061
commit aa7c98e225
2 changed files with 7 additions and 41 deletions
+7 -2
View File
@@ -32,9 +32,14 @@ func (tr *TermRenderer) NewElement(node ast.Node, source []byte) Element {
switch node.Kind() {
// Document
case ast.KindDocument:
e := &BlockElement{
Block: &bytes.Buffer{},
Style: ctx.styles.Document,
Margin: true,
}
return Element{
Renderer: &DocumentElement{},
Finisher: &DocumentElement{},
Renderer: e,
Finisher: e,
}
// Heading