Improve footnote handling
- Footnotes separator rather than headline to get around i18n - Warn on footnote redefinition - Do not export footnote definitions at point of definition, only in the footnote section. - Do not automatically exclude Footnotes section to get around possibly hiding other content of such a section - and i18n. The user has the choice of explicitly hiding the section via a :noexport: tag. and some other refactoring
This commit is contained in:
parent
beff0c0d8a
commit
eb7db9b968
11 changed files with 114 additions and 60 deletions
|
@ -157,7 +157,7 @@ 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.Footnotes.add(name, link.Definition)
|
||||
d.addFootnote(name, link.Definition)
|
||||
}
|
||||
return len(m[0]), link
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue