Fix links to radio targets.
* ox-latex.el (org-latex-link): * ox-html.el (org-html-link): * ox-beamer.el (org-beamer-link): Fix links to radio targets. * ox-ascii.el (org-ascii-link): For links to a radio target, use the link, not the target. Thanks to Noah Slater for reporting this.
This commit is contained in:
parent
28a9e35ddb
commit
d2e7b1b5b1
|
@ -1385,12 +1385,9 @@ INFO is a plist holding contextual information."
|
||||||
(let ((ref (org-element-property :path link)))
|
(let ((ref (org-element-property :path link)))
|
||||||
(format (org-export-get-coderef-format ref desc)
|
(format (org-export-get-coderef-format ref desc)
|
||||||
(org-export-resolve-coderef ref info))))
|
(org-export-resolve-coderef ref info))))
|
||||||
;; Do not apply a special syntax on radio links. Though, use
|
;; Do not apply a special syntax on radio links.
|
||||||
;; transcoded target's contents as output.
|
|
||||||
((string= type "radio")
|
((string= type "radio")
|
||||||
(let ((destination (org-export-resolve-radio-link link info)))
|
(org-element-property :path link))
|
||||||
(when destination
|
|
||||||
(org-export-data (org-element-contents destination) info))))
|
|
||||||
;; Do not apply a special syntax on fuzzy links pointing to
|
;; Do not apply a special syntax on fuzzy links pointing to
|
||||||
;; targets.
|
;; targets.
|
||||||
((string= type "fuzzy")
|
((string= type "fuzzy")
|
||||||
|
|
|
@ -690,8 +690,8 @@ used as a communication channel."
|
||||||
(when destination
|
(when destination
|
||||||
(format "\\hyperlink%s{%s}{%s}"
|
(format "\\hyperlink%s{%s}{%s}"
|
||||||
(or (org-beamer--element-has-overlay-p link) "")
|
(or (org-beamer--element-has-overlay-p link) "")
|
||||||
(org-export-solidify-link-text path)
|
(org-export-data (org-element-contents destination) info)
|
||||||
(org-export-data (org-element-contents destination) info)))))
|
(org-export-solidify-link-text path)))))
|
||||||
((and (member type '("custom-id" "fuzzy" "id"))
|
((and (member type '("custom-id" "fuzzy" "id"))
|
||||||
(let ((destination (if (string= type "fuzzy")
|
(let ((destination (if (string= type "fuzzy")
|
||||||
(org-export-resolve-fuzzy-link link info)
|
(org-export-resolve-fuzzy-link link info)
|
||||||
|
|
|
@ -2721,9 +2721,9 @@ INFO is a plist holding contextual information. See
|
||||||
(let ((destination (org-export-resolve-radio-link link info)))
|
(let ((destination (org-export-resolve-radio-link link info)))
|
||||||
(when destination
|
(when destination
|
||||||
(format "<a href=\"#%s\"%s>%s</a>"
|
(format "<a href=\"#%s\"%s>%s</a>"
|
||||||
(org-export-solidify-link-text path)
|
(org-export-data (org-element-contents destination) info)
|
||||||
attributes
|
attributes
|
||||||
(org-export-data (org-element-contents destination) info)))))
|
(org-export-solidify-link-text path)))))
|
||||||
;; Links pointing to a headline: Find destination and build
|
;; Links pointing to a headline: Find destination and build
|
||||||
;; appropriate referencing command.
|
;; appropriate referencing command.
|
||||||
((member type '("custom-id" "fuzzy" "id"))
|
((member type '("custom-id" "fuzzy" "id"))
|
||||||
|
|
|
@ -1800,8 +1800,8 @@ INFO is a plist holding contextual information. See
|
||||||
(let ((destination (org-export-resolve-radio-link link info)))
|
(let ((destination (org-export-resolve-radio-link link info)))
|
||||||
(when destination
|
(when destination
|
||||||
(format "\\hyperref[%s]{%s}"
|
(format "\\hyperref[%s]{%s}"
|
||||||
(org-export-solidify-link-text path)
|
(org-export-data (org-element-contents destination) info)
|
||||||
(org-export-data (org-element-contents destination) info)))))
|
(org-export-solidify-link-text path)))))
|
||||||
;; Links pointing to a headline: Find destination and build
|
;; Links pointing to a headline: Find destination and build
|
||||||
;; appropriate referencing command.
|
;; appropriate referencing command.
|
||||||
((member type '("custom-id" "fuzzy" "id"))
|
((member type '("custom-id" "fuzzy" "id"))
|
||||||
|
|
Loading…
Reference in New Issue