Fix prefixing first paragraph with a newline, when there's no previous sibling node

This commit is contained in:
Christian Muehlhaeuser
2019-12-15 05:52:03 +01:00
parent a16d2a53b1
commit 27f86be69a
7 changed files with 7 additions and 7 deletions
+3 -1
View File
@@ -62,7 +62,9 @@ func (tr *ANSIRenderer) NewElement(node ast.Node, source []byte) Element {
return Element{}
}
return Element{
Renderer: &ParagraphElement{},
Renderer: &ParagraphElement{
First: node.PreviousSibling() == nil,
},
Finisher: &ParagraphElement{},
}