Fix multiline emphasis

I didn't have a test case for this and broke it when i introduced Line nodes to
support printing back to org mode. Oops
This commit is contained in:
Niklas Fasching 2018-12-10 17:14:13 +01:00
parent 6de03e0d13
commit 6637e63892
9 changed files with 104 additions and 71 deletions

View file

@ -12,10 +12,8 @@ func isSecondBlankLine(d *Document, i int) bool {
}
func isEmptyLineParagraph(n Node) bool {
if p, _ := n.(Paragraph); len(p.Children) == 1 {
return len(p.Children[0].(Line).Children) == 0
}
return false
p, ok := n.(Paragraph)
return ok && len(p.Children) == 0
}
func isImageOrVideoLink(n Node) bool {