diff --git a/org/html_writer.go b/org/html_writer.go
index bd8a119..a12d4bf 100644
--- a/org/html_writer.go
+++ b/org/html_writer.go
@@ -46,6 +46,7 @@ type HTMLWriter struct {
type footnotes struct {
mapping map[string]int
list []*FootnoteDefinition
+ unused map[string]*FootnoteDefinition
}
var emphasisTags = map[string][]string{
@@ -89,6 +90,7 @@ func NewHTMLWriter() *HTMLWriter {
TopLevelHLevel: 2,
footnotes: &footnotes{
mapping: map[string]int{},
+ unused: map[string]*FootnoteDefinition{},
},
}
}
@@ -228,7 +230,10 @@ func (w *HTMLWriter) WriteFootnotes(d *Document) {
w.WriteString(`
diff --git a/org/testdata/footnotes.org b/org/testdata/footnotes.org
index 44a9019..ab200a7 100644
--- a/org/testdata/footnotes.org
+++ b/org/testdata/footnotes.org
@@ -41,8 +41,11 @@ This shouldn't happen when the definition line and the line after that are empty
[fn:7]
There's multiple reasons for that. Among others, doing so requires i18n (to recognize the section) and silently
-hides content before and after the footnotes.
+hides content before and after the footnotes[fn:8].
this is not part of [fn:7] anymore as there are 2 blank lines in between!
+
+
+[fn:8] Footnotes can be linked from another footnote's definition.
diff --git a/org/testdata/footnotes.pretty_org b/org/testdata/footnotes.pretty_org
index 44a9019..ab200a7 100644
--- a/org/testdata/footnotes.pretty_org
+++ b/org/testdata/footnotes.pretty_org
@@ -41,8 +41,11 @@ This shouldn't happen when the definition line and the line after that are empty
[fn:7]
There's multiple reasons for that. Among others, doing so requires i18n (to recognize the section) and silently
-hides content before and after the footnotes.
+hides content before and after the footnotes[fn:8].
this is not part of [fn:7] anymore as there are 2 blank lines in between!
+
+
+[fn:8] Footnotes can be linked from another footnote's definition.