Refactor footnote handling
- Remove unused footnote section title option - Move away from maintaining a list of footnotes in the document (only needed for html export, potential maintainance overhead when modifying the document) and rather only build it on export when required. - HTML export: Rename all footnotes to numbers (so we can support anonymous footnote references by assigning them a number) and export footnotes in order of reference, not definition. The implementation of this makes it natural to also stop exporting unused footnote definitions so we do that as well.
This commit is contained in:
parent
50395f999a
commit
6dc04b4b02
8 changed files with 69 additions and 100 deletions
|
@ -171,7 +171,6 @@ func (d *Document) parseFootnoteReference(input string, start int) (int, Node) {
|
|||
link := FootnoteLink{name, nil}
|
||||
if definition != "" {
|
||||
link.Definition = &FootnoteDefinition{name, []Node{Paragraph{d.parseInline(definition)}}, true}
|
||||
d.addFootnote(name, link.Definition)
|
||||
}
|
||||
return len(m[0]), link
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue