mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 08:27:18 -04:00
Drop redundant DocumentElement
This commit is contained in:
+7
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user