diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 69f9eec9d..ec4287e11 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -544,7 +544,7 @@ value if point was successfully moved." (user-error "Definition is outside narrowed part of buffer"))) (org-mark-ring-push) (goto-char def-start) - (looking-at (format "\\[fn:%s[]:] ?" (regexp-quote label))) + (looking-at (format "\\[fn:%s[]:]" (regexp-quote label))) (goto-char (match-end 0)) (org-show-context 'link-search) (when (derived-mode-p 'org-mode) diff --git a/testing/lisp/test-org-footnote.el b/testing/lisp/test-org-footnote.el index 6ff8fea7d..99e4ca902 100644 --- a/testing/lisp/test-org-footnote.el +++ b/testing/lisp/test-org-footnote.el @@ -231,7 +231,7 @@ ;; anonymous footnotes. (should (equal - "Definition." + " Definition." (org-test-with-temp-text "Some text\n[fn:1] Definition." (org-footnote-goto-definition "1") (buffer-substring (point) (point-max)))))