forked from mirrors/org-mode
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.
This commit is contained in:
parent
1fb57438bd
commit
73fe0ab77a
|
@ -2426,10 +2426,11 @@ Inline images can have these attributes:
|
||||||
(parent (org-export-get-parent-element link))
|
(parent (org-export-get-parent-element link))
|
||||||
(caption (org-export-data (org-export-get-caption parent) info))
|
(caption (org-export-data (org-export-get-caption parent) info))
|
||||||
(label (org-element-property :name parent))
|
(label (org-element-property :name parent))
|
||||||
(alt (org-export-read-attribute :attr_html parent :alt))
|
(attrs (org-export-read-attribute :attr_html parent))
|
||||||
(width (org-export-read-attribute :attr_html parent :width))
|
(alt (plist-get attrs :alt))
|
||||||
(height (org-export-read-attribute :attr_html parent :height))
|
(width (plist-get attrs :width))
|
||||||
(options (org-export-read-attribute :attr_html parent :options)))
|
(height (plist-get attrs :height))
|
||||||
|
(options (plist-get attrs :options)))
|
||||||
;; Return proper string, depending on DISPOSITION.
|
;; Return proper string, depending on DISPOSITION.
|
||||||
(org-html-format-inline-image
|
(org-html-format-inline-image
|
||||||
path caption label
|
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)))
|
(let ((att (org-export-read-attribute :attr_html parent :options)))
|
||||||
(unless (and desc att (string-match (regexp-quote att) desc))
|
(unless (and desc att (string-match (regexp-quote att) desc))
|
||||||
att)))))
|
(or att ""))))))
|
||||||
(unless (string= attributes "")
|
(unless (string= attributes "")
|
||||||
(setq attributes (concat " " attributes))))
|
(setq attributes (concat " " attributes))))
|
||||||
(cond
|
(cond
|
||||||
|
|
Loading…
Reference in New Issue