summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-12-08 18:30:27 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2012-12-08 18:30:27 (GMT)
commit2aac1818d57d994628f154bae69686b28768def1 (patch)
tree8a4fba273b064efaee8a8f7053464aa7121658a9
parentcbb96d69d312a611a25be86369d7d055af4a7200 (diff)
downloadorg-mode-2aac1818d57d994628f154bae69686b28768def1.zip
org-mode-2aac1818d57d994628f154bae69686b28768def1.tar.gz
org-md: Fix export error with inline images
* contrib/lisp/org-md.el (org-md-link): Fix error with inline images.
-rw-r--r--contrib/lisp/org-md.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/lisp/org-md.el b/contrib/lisp/org-md.el
index c640a1e..80e7017 100644
--- a/contrib/lisp/org-md.el
+++ b/contrib/lisp/org-md.el
@@ -286,11 +286,14 @@ a communication channel."
destination info)
".")))))))
((org-export-inline-image-p link org-e-html-inline-image-rules)
- (format "![%s](%s)"
- (let ((caption (org-export-get-caption
- (org-export-get-parent-element link))))
- (when caption (org-export-data caption info)))
- path))
+ (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)))))
+ (format "![%s](%s)"
+ (let ((caption (org-export-get-caption
+ (org-export-get-parent-element link))))
+ (when caption (org-export-data caption info)))
+ path)))
((string= type "coderef")
(let ((ref (org-element-property :path link)))
(format (org-export-get-coderef-format ref contents)