Refactor Footnotes: Exclude footnotes heading during export, not parsing

Until now the footnotes section was parsed but not included in the resulting
AST - his required rebuilding it in the OrgWriter. It feels cleaner to include
it in the AST and only exclude it in the export
This commit is contained in:
Niklas Fasching 2018-12-17 13:08:35 +01:00
parent ced166dc18
commit ac2597af4c
5 changed files with 17 additions and 31 deletions

View file

@ -68,9 +68,5 @@ func (d *Document) parseHeadline(i int, parentStop stopFn) (int, Node) {
}
}
headline.Children = nodes
if headline.Lvl == 1 && text == d.Footnotes.Title && d.Footnotes.ExcludeHeading {
return consumed + 1, nil
}
return consumed + 1, headline
}