mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-21 19:34:58 +00:00
ox-odt: Improve link generation in 4e5c737311
* lisp/ox-odt.el (org-odt-link): Use file: link code branch when exporting id: links to document property drawers. Call `org-odt-link' with equivalent file: link instead of duplicating the existing code. Reported-by: Max Nikulin <manikulin@gmail.com> Link: https://orgmode.org/list/tiubca$1252$1@ciao.gmane.io
This commit is contained in:
parent
524e0e0b7b
commit
2f5e7103e5
@ -2738,11 +2738,15 @@ INFO is a plist holding contextual information. See
|
||||
(org-export-get-reference destination info)
|
||||
(or desc (org-export-get-ordinal destination info))))
|
||||
;; Link to a file, corresponding to string return value of
|
||||
;; `org-export-resolve-id-link'.
|
||||
;; `org-export-resolve-id-link'. Export it is file link.
|
||||
(plain-text
|
||||
(format "<text:a xlink:type=\"simple\" xlink:href=\"%s\">%s</text:a>"
|
||||
destination
|
||||
(or desc (org-export-get-ordinal destination info))))
|
||||
(let ((file-link (org-element-copy link)))
|
||||
(org-element-put-property file-link :type "file")
|
||||
(org-element-put-property file-link :path destination)
|
||||
(org-element-put-property
|
||||
file-link
|
||||
:raw-link (format "file:%s" destination))
|
||||
(org-odt-link file-link desc info)))
|
||||
;; Fuzzy link points to some element (e.g., an inline image,
|
||||
;; a math formula or a table).
|
||||
(otherwise
|
||||
|
Loading…
Reference in New Issue
Block a user