summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-06 09:11:59 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-06 09:11:59 +0200
commitf3d7284ebd0c6e8248f7c3c444937270402b0ba6 (patch)
treebbd7e479b78b849b5eb1eed22527b66cbec797f4
parent62b4edb2632bc075459b2672c4c41e117b6f60b5 (diff)
downloadorg-mode-f3d7284ebd0c6e8248f7c3c444937270402b0ba6.tar.gz
ox-md: Fix non-"file" image links
* lisp/ox-md.el (org-md-link): Handle non-"file" image links. Reported-by: Jay Kamat <jaygkamat@gmail.com> <http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00147.html>
-rw-r--r--lisp/ox-md.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index ae8601a..2762160 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)))