Fix line-break before list items

This commit is contained in:
Christian Muehlhaeuser
2019-11-24 04:44:12 +01:00
parent 9a3c403d78
commit 5191ed1f9c
+6 -1
View File
@@ -109,9 +109,14 @@ func NewElement(node *bf.Node) Element {
Post: "",
}
case bf.Paragraph:
pre := "\n"
if node.Parent != nil && node.Parent.Type == bf.Item {
pre = ""
}
return Element{
Token: string(node.Literal),
Pre: "\n",
Pre: pre,
Post: "\n",
}
case bf.Heading: