|
@@ -760,21 +760,26 @@ Some other text
|
|
|
"Test `footnote-definition' parser."
|
|
|
(should
|
|
|
(org-test-with-temp-text "[fn:1] Definition"
|
|
|
- (org-element-map
|
|
|
- (org-element-parse-buffer) 'footnote-definition 'identity nil t)))
|
|
|
+ (org-element-map (org-element-parse-buffer) 'footnote-definition
|
|
|
+ 'identity nil t)))
|
|
|
;; Footnote with more contents
|
|
|
(should
|
|
|
(= 29
|
|
|
(org-element-property
|
|
|
:end
|
|
|
(org-test-with-temp-text "[fn:1] Definition\n\n| a | b |"
|
|
|
- (org-element-map
|
|
|
- (org-element-parse-buffer)
|
|
|
- 'footnote-definition 'identity nil t)))))
|
|
|
+ (org-element-map (org-element-parse-buffer) 'footnote-definition
|
|
|
+ 'identity nil t)))))
|
|
|
;; Footnote starting with special syntax.
|
|
|
(should-not
|
|
|
(org-test-with-temp-text "[fn:1] - no item"
|
|
|
- (org-element-map (org-element-parse-buffer) 'item 'identity))))
|
|
|
+ (org-element-map (org-element-parse-buffer) 'item 'identity)))
|
|
|
+ ;; Correctly handle footnote starting with an empty line.
|
|
|
+ (should
|
|
|
+ (= 9
|
|
|
+ (org-test-with-temp-text "[fn:1]\n\n Body"
|
|
|
+ (org-element-property :contents-begin
|
|
|
+ (org-element-at-point))))))
|
|
|
|
|
|
|
|
|
;;;; Footnotes Reference.
|