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,8 @@ var DefaultFrontMatterHandler = func(k, v string) interface{} {
func NewDocument() *Document {
return &Document{
Footnotes: &Footnotes{
ExcludeHeading: true,
Title: "Footnotes",
Definitions: map[string]*FootnoteDefinition{},
Title: "Footnotes",
Definitions: map[string]*FootnoteDefinition{},
},
AutoLink: true,
MaxEmphasisNewLines: 1,