forked from mirrors/org-mode
ox-html: Always resolve external custom-id links
* lisp/ox-html.el (org-html-link): Always resolve external custom-id links. Suggested-by: Alan Schmitt <alan.schmitt@polytechnique.org> <http://permalink.gmane.org/gmane.emacs.orgmode/103552>
This commit is contained in:
parent
ce4143e79d
commit
8594aed1d6
|
@ -2846,12 +2846,17 @@ INFO is a plist holding contextual information. See
|
||||||
;; relative to a custom-id, a headline title a name,
|
;; relative to a custom-id, a headline title a name,
|
||||||
;; a target or a radio-target.
|
;; a target or a radio-target.
|
||||||
(let ((option (org-element-property :search-option link)))
|
(let ((option (org-element-property :search-option link)))
|
||||||
(if (not option) raw-path
|
(cond ((not option) raw-path)
|
||||||
(concat raw-path
|
;; Since HTML back-end use custom-id value as-is,
|
||||||
"#"
|
;; resolving is them is trivial.
|
||||||
(org-publish-resolve-external-link
|
((eq (string-to-char option) ?#)
|
||||||
option
|
(concat raw-path "#" option))
|
||||||
(org-element-property :path link))))))
|
(t
|
||||||
|
(concat raw-path
|
||||||
|
"#"
|
||||||
|
(org-publish-resolve-external-link
|
||||||
|
option
|
||||||
|
(org-element-property :path link)))))))
|
||||||
(t raw-path)))
|
(t raw-path)))
|
||||||
;; Extract attributes from parent's paragraph. HACK: Only do
|
;; Extract attributes from parent's paragraph. HACK: Only do
|
||||||
;; this for the first link in parent (inner image link for
|
;; this for the first link in parent (inner image link for
|
||||||
|
|
Loading…
Reference in a new issue