summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-03-20 07:54:16 +0100
committerBastien Guerry <bzg@altern.org>2013-03-20 07:54:16 +0100
commit73fe0ab77aa61ca0244674ba1d49c835b258a09e (patch)
treef2fc7fa829a8dc634ae9c6c17f63c648d116fd75
parent1fb57438bd9229acdeef0a3e7dac09677ba8467b (diff)
downloadorg-mode-73fe0ab77aa61ca0244674ba1d49c835b258a09e.tar.gz
ox-html.el (org-html-link): Don't insert nil if there is no attributes
* ox-html.el (org-html-link--inline-image): Small refactoring. (org-html-link): Don't insert nil if there is no attributes. Thanks to Samuel Wales for reporting this.
-rw-r--r--lisp/ox-html.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 520f3ca..c119549 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2426,10 +2426,11 @@ Inline images can have these attributes:
(parent (org-export-get-parent-element link))
(caption (org-export-data (org-export-get-caption parent) info))
(label (org-element-property :name parent))
- (alt (org-export-read-attribute :attr_html parent :alt))
- (width (org-export-read-attribute :attr_html parent :width))
- (height (org-export-read-attribute :attr_html parent :height))
- (options (org-export-read-attribute :attr_html parent :options)))
+ (attrs (org-export-read-attribute :attr_html parent))
+ (alt (plist-get attrs :alt))
+ (width (plist-get attrs :width))
+ (height (plist-get attrs :height))
+ (options (plist-get attrs :options)))
;; Return proper string, depending on DISPOSITION.
(org-html-format-inline-image
path caption label
@@ -2549,7 +2550,7 @@ INFO is a plist holding contextual information. See
""
(let ((att (org-export-read-attribute :attr_html parent :options)))
(unless (and desc att (string-match (regexp-quote att) desc))
- att)))))
+ (or att ""))))))
(unless (string= attributes "")
(setq attributes (concat " " attributes))))
(cond