org-html.el (org-html-handle-links): Fix bug in setting the attribute for link with images

* org-html.el (org-html-handle-links): When the link
description is an image and the attribute is "width",
pass the attribute to the <img ...> tag.

Thanks to John Hendy for reporting this.
This commit is contained in:
Bastien Guerry 2013-01-31 10:25:03 +01:00
parent ebad7d9226
commit 55f4f92183

View file

@ -1030,7 +1030,10 @@ OPT-PLIST is the export options list."
(if (string-match "^file:" desc)
(setq desc (substring desc (match-end 0)))))
(setq desc (org-add-props
(concat "<img src=\"" desc "\" alt=\""
(concat "<img src=\"" desc "\" "
(when (save-match-data (string-match "width=" attr))
(prog1 (concat attr " ") (setq attr "")))
"alt=\""
(file-name-nondirectory desc) "\"/>")
'(org-protected t))))
(cond