Browse Source

ox-md.el: Preserve radio target hyperlink

* lisp/ox-md.el (org-md-link): Format markdown hyperlink from radio
target.

TINYCHANGE
Turbo Cafe 4 years ago
parent
commit
3916a57406
1 changed files with 6 additions and 1 deletions
  1. 6 1
      lisp/ox-md.el

+ 6 - 1
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))))))