mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-12 16:24:10 +00:00
Avoid erroneous normalization of bracket link parts
* org-exp.el (org-export-normalize-links): Mark bracket links before normalization to avoid erroneous normalization of bracket link parts. This fixes a bug reported by M. Bauer at <http://thread.gmane.org/gmane.emacs.orgmode/49756> and allows proper normalization of bracket links with a link in the query part, e.g. [[http://example.tld?q=http://example.tld][Example]]
This commit is contained in:
parent
ebd450a170
commit
bc607a9af4
@ -2083,10 +2083,11 @@ Also, store forced alignment information found in such lines."
|
||||
(re-angle-link (concat "\\([^[]\\)" org-angle-link-re))
|
||||
nodesc)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward org-bracket-link-regexp nil t)
|
||||
(put-text-property (match-beginning 0) (match-end 0) 'org-normalized-link t))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward re-plain-link nil t)
|
||||
(unless (org-string-match-p
|
||||
"\\[\\[\\S-+:\\S-*?\\<"
|
||||
(buffer-substring (point-at-bol) (match-beginning 0)))
|
||||
(unless (get-text-property (match-beginning 0) 'org-normalized-link)
|
||||
(goto-char (1- (match-end 0)))
|
||||
(org-if-unprotected-at (1+ (match-beginning 0))
|
||||
(let* ((s (concat (match-string 1)
|
||||
|
Loading…
Reference in New Issue
Block a user