ox-md: Fix image transcoding

* lisp/ox-md.el (org-md-link): Do not confuse caption and alt-text.
  Provide "img" as default alt-text.
This commit is contained in:
Nicolas Goaziou 2014-02-08 15:45:25 +01:00
parent 7f287d1b62
commit 87b48e5a28
1 changed files with 7 additions and 6 deletions

View File

@ -302,12 +302,13 @@ a communication channel."
((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)))))
(format "![%s](%s)"
(let ((caption (org-export-get-caption
(org-export-get-parent-element link))))
(when caption (org-export-data caption info)))
path)))
(expand-file-name raw-path))))
(caption (org-export-data
(org-export-get-caption
(org-export-get-parent-element link)) info)))
(format "![img](%s)"
(if (not (org-string-nw-p caption)) path
(format "%s \"%s\"" path caption)))))
((string= type "coderef")
(let ((ref (org-element-property :path link)))
(format (org-export-get-coderef-format ref contents)