From d6aa8ffa13c0070234a0a5a7860c201e00ed7b0c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 29 Aug 2011 13:05:57 +0200 Subject: [PATCH] org-footnote: fix xhtml export * lisp/org-footnote.el (org-footnote-normalize): be sure to separate the last footnote definition from the rest of the buffer. Thanks to Jambunathan K for reporting this. --- lisp/org-footnote.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 9765aaf17..04389efad 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -774,7 +774,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (when (and (derived-mode-p 'message-mode) (save-excursion (re-search-forward message-signature-separator nil t))) - (open-line 2)) + (open-line 1)) (when org-footnote-tag-for-non-org-mode-files (insert "\n" org-footnote-tag-for-non-org-mode-files "\n"))) ((and org-footnote-section (not export-props)) @@ -787,6 +787,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (insert (mapconcat (lambda (x) (format "\n[%s] %s" (nth (if sort-only 0 1) x) (nth 2 x))) ref-table "\n")) + (unless (eobp) (insert "\n")) ;; When exporting, add newly inserted markers along with their ;; associated definition to `org-export-footnotes-seen'. (when export-props