exporting to markdown loses radio target hyperlinks.


-------------------------------------------------
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net
 
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
>From bbe8ef631467f9f5f097412a946a82d38e96235c Mon Sep 17 00:00:00 2001
From: "turbo.c...@clovermail.net" <turbo.c...@clovermail.net>
Date: Tue, 3 Nov 2020 22:24:03 +0200
Subject: [PATCH] ox-md.el/markdown-hyperlink

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


---
 lisp/ox-md.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 1d20c04f4..a63815e43 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -543,7 +543,13 @@ 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>%s</a>"
+		  (org-export-get-reference destination info)
+		  ""
+		  desc))))
      (t (if (not desc) (format "<%s>" path)
 	  (format "[%s](%s)" desc path))))))
 
-- 
2.29.1

Reply via email to