summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTurbo Cafe <turbo.cafe@clovermail.net>2020-11-03 22:24:03 +0200
committerKyle Meyer <kyle@kyleam.com>2021-01-22 00:05:47 -0500
commit3916a574063887f145af2e42667fb6478a065440 (patch)
treee64f6fd4b935a8f63c5949fe391c9a5e96b52893
parenta8df7670c8f7d52d779e1d8e922d519b0aec3afb (diff)
downloadorg-mode-3916a574063887f145af2e42667fb6478a065440.tar.gz
ox-md.el: Preserve radio target hyperlink
* lisp/ox-md.el (org-md-link): Format markdown hyperlink from radio target. TINYCHANGE
-rw-r--r--lisp/ox-md.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index f4afe6b..b6b2c17 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -543,7 +543,12 @@ INFO is a plist holding contextual information. See
((string= type "coderef")
(format (org-export-get-coderef-format path desc)
(org-export-resolve-coderef path info)))
- ((equal type "radio") desc)
+ ((string= type "radio")
+ (let ((destination (org-export-resolve-radio-link link info)))
+ (if (not destination) desc
+ (format "<a href=\"#%s\">%s</a>"
+ (org-export-get-reference destination info)
+ desc))))
(t (if (not desc) (format "<%s>" path)
(format "[%s](%s)" desc path))))))