diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2021-04-13 00:37:16 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2021-04-13 00:37:16 +0200 |
commit | b33face41c6b4fbd96d127b56b19bbb5f33e34ce (patch) | |
tree | f802f7575adf948ba0bf7229121f754fba64af38 | |
parent | b049f839b015c44f5f9cab87907a483c79b8dabc (diff) | |
parent | 6dbd132e62c0305ce021d550ea66268e0497f80d (diff) | |
download | org-mode-b33face41c6b4fbd96d127b56b19bbb5f33e34ce.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/ox-texinfo.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 13430c4..5531653 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -846,9 +846,17 @@ CONTENTS is nil. INFO is a plist holding contextual information." FOOTNOTE is the footnote to define. CONTENTS is nil. INFO is a plist holding contextual information." - (let ((def (org-export-get-footnote-definition footnote info))) + (let* ((contents (org-export-get-footnote-definition footnote info)) + (data (org-export-data contents info))) (format "@footnote{%s}" - (org-trim (org-export-data def info))))) + ;; It is invalid to close a footnote on a line starting + ;; with "@end". As a safety net, we leave a newline + ;; character before the closing brace. However, when the + ;; footnote ends with a paragraph, it is visually pleasing + ;; to move the brace right after its end. + (if (eq 'paragraph (org-element-type (org-last contents))) + (org-trim data) + data)))) ;;;; Headline |