summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-09 14:30:41 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-09 14:30:41 +0200
commit5adb8bcfa2d3611eaa6c69aab23103e60d28bd57 (patch)
treeaf90fa27e36660739de615d2a9fbf29733302d43
parent89483bc8739037c4b8d39f35bc99ac8c924b3282 (diff)
downloadorg-mode-5adb8bcfa2d3611eaa6c69aab23103e60d28bd57.tar.gz
ox-odt: Tiny fix
* lisp/ox-odt.el (org-odt-link): No need to handle nil values for fuzzy links.
-rw-r--r--lisp/ox-odt.el23
1 files changed, 8 insertions, 15 deletions
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index ffe8b2e..a9f1242 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2784,17 +2784,10 @@ INFO is a plist holding contextual information. See
(org-export-resolve-fuzzy-link link info)
(org-export-resolve-id-link link info))))
(case (org-element-type destination)
- ;; Case 1: Fuzzy link points nowhere.
- ('nil
- (format "<text:span text:style-name=\"%s\">%s</text:span>"
- "Emphasis"
- (or desc
- (org-export-data (org-element-property :raw-link link)
- info))))
- ;; Case 2: Fuzzy link points to a headline.
+ ;; Fuzzy link points to a headline. If there's
+ ;; a description, create a hyperlink. Otherwise, try to
+ ;; provide a meaningful description.
(headline
- ;; If there's a description, create a hyperlink.
- ;; Otherwise, try to provide a meaningful description.
(if (not desc) (org-odt-link--infer-description destination info)
(let ((label
(or (and (string= type "custom-id")
@@ -2803,15 +2796,15 @@ INFO is a plist holding contextual information. See
(format
"<text:a xlink:type=\"simple\" xlink:href=\"#%s\">%s</text:a>"
label desc))))
- ;; Case 3: Fuzzy link points to a target.
+ ;; Fuzzy link points to a target. If there's a description,
+ ;; create a hyperlink. Otherwise, try to provide
+ ;; a meaningful description.
(target
- ;; If there's a description, create a hyperlink.
- ;; Otherwise, try to provide a meaningful description.
(format "<text:a xlink:type=\"simple\" xlink:href=\"#%s\">%s</text:a>"
(org-export-get-reference destination info)
(or desc (org-export-get-ordinal destination info))))
- ;; Case 4: Fuzzy link points to some element (e.g., an
- ;; inline image, a math formula or a table).
+ ;; Fuzzy link points to some element (e.g., an inline image,
+ ;; a math formula or a table).
(otherwise
(let ((label-reference
(ignore-errors