forked from mirrors/org-mode
Footnotes: Avoid matches in links.
Reported by Ian Barton.
This commit is contained in:
parent
bc530157aa
commit
0405dde8ef
|
@ -1,5 +1,10 @@
|
|||
2009-01-19 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-activate-footnote-links): Don't allow match inside a
|
||||
link.
|
||||
|
||||
* org-footnote.el (org-footnote-re): Don't allow match inside a link.
|
||||
|
||||
* org-export-latex.el (org-export-latex-links): Keep a relative
|
||||
path relative also after export.
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
(declare-function org-end-of-subtree "org" (&optional invisible-ok to-heading))
|
||||
|
||||
(defconst org-footnote-re
|
||||
(concat "." ; to make sure it is not at the beginning of a line
|
||||
(concat "[^][\n]" ; to make sure it is not at the beginning of a line
|
||||
"\\["
|
||||
"\\(?:"
|
||||
"\\([0-9]+\\)"
|
||||
|
|
|
@ -3785,15 +3785,15 @@ will be prompted for."
|
|||
|
||||
(defun org-activate-footnote-links (limit)
|
||||
"Run through the buffer and add overlays to links."
|
||||
(if (re-search-forward "\\[\\([0-9]+\\]\\|fn:[^ \t\r\n:]+?[]:]\\)"
|
||||
(if (re-search-forward "\\(^\\|[^][]\\)\\(\\[\\([0-9]+\\]\\|fn:[^ \t\r\n:]+?[]:]\\)\\)"
|
||||
limit t)
|
||||
(progn
|
||||
(add-text-properties (match-beginning 0) (match-end 0)
|
||||
(add-text-properties (match-beginning 1) (match-end 1)
|
||||
(list 'mouse-face 'highlight
|
||||
'rear-nonsticky org-nonsticky-props
|
||||
'keymap org-mouse-map
|
||||
'help-echo
|
||||
(if (= (point-at-bol) (match-beginning 0))
|
||||
(if (= (point-at-bol) (match-beginning 1))
|
||||
"Footnote definition"
|
||||
"Footnote reference")
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue