mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 23:32:52 +00:00
org-lparse.el: Correctly handle footnote refs in a list item
* org-lparse.el (org-lparse-end-footnote-definition): Cleanup newlines in a transcoded footnote definition. This ensures that the line that is currently being processed by `org-do-lparse' loop doesn't get broken up into multiple lines. Fix for the following bug -
This commit is contained in:
parent
f6727a9dde
commit
8506c90c4b
|
@ -1813,6 +1813,12 @@ Stripping happens only when the exported backend is not one of
|
||||||
(org-lparse-end 'FOOTNOTE-DEFINITION n)
|
(org-lparse-end 'FOOTNOTE-DEFINITION n)
|
||||||
(setq org-lparse-insert-tag-with-newlines 'both)
|
(setq org-lparse-insert-tag-with-newlines 'both)
|
||||||
(let ((footnote-def (org-lparse-end-collect)))
|
(let ((footnote-def (org-lparse-end-collect)))
|
||||||
|
;; Cleanup newlines in footnote definition. This ensures that a
|
||||||
|
;; transcoded line is never (wrongly) broken in to multiple lines.
|
||||||
|
(let ((pos 0))
|
||||||
|
(while (string-match "[\r\n]+" footnote-def pos)
|
||||||
|
(setq pos (1+ (match-beginning 0)))
|
||||||
|
(setq footnote-def (replace-match " " t t footnote-def))))
|
||||||
(push (cons n footnote-def) org-lparse-footnote-definitions)))
|
(push (cons n footnote-def) org-lparse-footnote-definitions)))
|
||||||
|
|
||||||
(defvar org-lparse-collect-buffer nil
|
(defvar org-lparse-collect-buffer nil
|
||||||
|
|
Loading…
Reference in a new issue