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>
This commit is contained in:
Nicolas Goaziou 2017-08-06 09:11:59 +02:00
parent 62b4edb263
commit f3d7284ebd
1 changed files with 3 additions and 2 deletions

View File

@ -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)))