commit 39e810e114553fdf09785d2a81923103f689e907
parent 919d44b42c615cd87886b3fa2d434bf03dcde80a
Author: wangyg <shalir@outlook.com>
Date: Mon, 11 Apr 2016 21:45:05 +0800
change insert path to file:relative-path for org export
Fixes #30
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/org-download.el b/org-download.el
@@ -314,12 +314,12 @@ It's inserted before the image link and is used to annotate it.")
(insert
(concat
(funcall org-download-annotate-function link)
- (format "\n%s[[%s]]"
+ (format "\n%s[[file:%s]]"
(if (= org-download-image-width 0)
""
(format
"#+attr_html: :width %dpx\n" org-download-image-width))
- filename)))
+ (file-relative-name filename (file-name-directory (buffer-name))))))
(org-display-inline-images)))))
(defun org-download--at-comment-p ()