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:
parent
ced166dc18
commit
ac2597af4c
5 changed files with 17 additions and 31 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue