From f3d7284ebd0c6e8248f7c3c444937270402b0ba6 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 6 Aug 2017 09:11:59 +0200 Subject: [PATCH] ox-md: Fix non-"file" image links * lisp/ox-md.el (org-md-link): Handle non-"file" image links. Reported-by: Jay Kamat --- lisp/ox-md.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/ox-md.el b/lisp/ox-md.el index ae8601ab2..276216064 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -395,8 +395,9 @@ 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))) - (if (not (file-name-absolute-p raw-path)) raw-path - (expand-file-name 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 (org-export-get-caption (org-export-get-parent-element link)) info)))