summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ox.el14
-rw-r--r--testing/lisp/test-ox.el9
2 files changed, 15 insertions, 8 deletions
diff --git a/lisp/ox.el b/lisp/ox.el
index 4fb054d..0eb97f1 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2721,14 +2721,12 @@ from tree."
(cond
((eq (org-element-type f) 'footnote-definition) f)
((eq (org-element-property :type f) 'standard) nil)
- (t
- ;; Since we're only interested in footnote definitions
- (let ((label (org-element-property :label f)))
- (when label ;Skip anonymous references.
- (apply
- #'org-element-create
- 'footnote-definition `(:label ,label :post-blank 1)
- (org-element-contents f))))))))))
+ (t (let ((label (org-element-property :label f)))
+ (when label ;Skip anonymous references.
+ (apply
+ #'org-element-create
+ 'footnote-definition `(:label ,label :post-blank 1)
+ (org-element-contents f))))))))))
;; If a select tag is active, also ignore the section before the
;; first headline, if any.
(when selected
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 976fbe7..8b07cca 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -2136,6 +2136,15 @@ Para2"
<point>Paragraph[fn:1]"
(narrow-to-region (point) (point-max))
(org-export-as (org-test-default-backend)))))
+ (should
+ (string-match
+ "D2"
+ (org-test-with-temp-text "
+\[fn:1] Out of scope[fn:2:D2]
+* Title
+<point>Paragraph[fn:1]"
+ (narrow-to-region (point) (point-max))
+ (org-export-as (org-test-default-backend)))))
;; Export footnotes in pruned parts of tree.
(should
(string-match