Browse Source

contrib/lisp/ox-confluence.el: Fix radio link export

* contrib/lisp/ox-confluence.el (org-confluence-link): Only use
the description when exporting radio links.

Thanks to Karl Voit for reporting this.
Bastien 1 month ago
parent
commit
ceb0ef95fb
1 changed files with 11 additions and 9 deletions
  1. 11 9
      contrib/lisp/ox-confluence.el

+ 11 - 9
contrib/lisp/ox-confluence.el

@@ -125,15 +125,17 @@
             (if (org-string-nw-p contents) contents ""))))
 
 (defun org-confluence-link (link desc info)
-  (let ((raw-link (org-element-property :raw-link link)))
-    (concat "["
-            (when (org-string-nw-p desc) (format "%s|" desc))
-            (cond
-             ((string-match "^confluence:" raw-link)
-              (replace-regexp-in-string "^confluence:" "" raw-link))
-             (t
-              raw-link))
-            "]")))
+  (if (string= "radio" (org-element-property :type link))
+      desc
+    (let ((raw-link (org-element-property :raw-link link)))
+      (concat "["
+              (when (org-string-nw-p desc) (format "%s|" desc))
+              (cond
+               ((string-match "^confluence:" raw-link)
+		(replace-regexp-in-string "^confluence:" "" raw-link))
+               (t
+		raw-link))
+              "]"))))
 
 (defun org-confluence-paragraph (paragraph contents info)
   "Transcode PARAGRAPH element for Confluence.