Hi,

Thanks for catching that. That was my fault, for failing to test
commit f3d7284ebd0c6e8248f7c3c444937270402b0ba6 properly.

See http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00147.html
for the previous thread.

I've attached a trivial patch which appears to fix the issue for me,
but I don't know if there's a cleaner way to do it or not (is there a
link property that keeps the ':' in either the link or the type?).

Thanks,
-Jay

On Tue, Aug 22, 2017 at 5:16 PM, Fabio Leimgruber
<fabio.leimgru...@posteo.eu> wrote:
> Hello everyone,
>
> using latest master, an org file containing just the link
>
> #+BEGIN_SRC org
> [[http://orgmode.org/img/org-mode-unicorn-logo.png]]
> #+END_SRC
>
> on export to markdown with =C-c C-e m m= produces the md file
>
> #+BEGIN_EXAMPLE
> # Table of Contents
>
>
>
> ![img](http//orgmode.org/img/org-mode-unicorn-logo.png)
> #+END_EXAMPLE
>
> containing an invalid URL.
>
> Best Regards,
>
> --
> Fabio Leimgruber
>
From 5d92257575e497e0955b3414fb1e1a69e5ea97f8 Mon Sep 17 00:00:00 2001
From: Jay Kamat <jaygka...@gmail.com>
Date: Tue, 22 Aug 2017 17:28:28 -0400
Subject: [PATCH] ox-md.el: Fix missing ':' in exported markdown image links

* lisp/ox-md.el (org-md-link): Append ':' to the type of non-file
  image links.
---
 lisp/ox-md.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 0dd1be095..ac94ba648 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -432,7 +432,7 @@ a communication channel."
 		       (org-export-get-reference destination info))))))))
      ((org-export-inline-image-p link org-html-inline-image-rules)
       (let ((path (let ((raw-path (org-element-property :path link)))
-		    (cond ((not (equal "file" type)) (concat type raw-path))
+		    (cond ((not (equal "file" type)) (concat type ":" raw-path))
 			  ((not (file-name-absolute-p raw-path)) raw-path)
 			  (t (expand-file-name raw-path)))))
 	    (caption (org-export-data
-- 
2.11.0

Reply via email to