Fix inline footnote definition parsing

footnote definition descriptions are always elements - not just raw inline
markup. we'll just wrap the description in a paragraph
This commit is contained in:
Niklas Fasching 2018-12-02 23:26:24 +01:00
parent d5bf4317b2
commit 0df8bc541b
2 changed files with 4 additions and 2 deletions

View file

@ -237,7 +237,8 @@ func (w *OrgWriter) writeFootnoteLink(l FootnoteLink) {
w.WriteString("[fn:" + l.Name)
if l.Definition != nil {
w.WriteString(":")
w.writeNodes(l.Definition.Children...)
line := l.Definition.Children[0].(Paragraph).Children[0].(Line)
w.writeNodes(line.Children...)
}
w.WriteString("]")
}