Fix paragraphs: Empty lines separate paragraphs

Somehow i thought it was 2 empty lines rather than 1 - makes more sense this
way... :D
This commit is contained in:
Niklas Fasching 2018-12-03 01:42:31 +01:00
parent c759df1efe
commit ed8764940f
5 changed files with 41 additions and 25 deletions

View file

@ -148,13 +148,6 @@ func (w *OrgWriter) writeFootnotes(d *Document) {
}
}
func isEmptyLineParagraph(n Node) bool {
if p, _ := n.(Paragraph); len(p.Children) == 1 {
return len(p.Children[0].(Line).Children) == 0
}
return false
}
func (w *OrgWriter) writeFootnoteDefinition(f FootnoteDefinition) {
w.WriteString(fmt.Sprintf("[fn:%s]", f.Name))
if !(len(f.Children) >= 1 && isEmptyLineParagraph(f.Children[0])) {