ox-html: Add html attributes to quote-block

* lisp/ox-html.el (org-html-quote-block): Enables #+attr_html: and puts
  a id attribute when the block is named into the html element.
This commit is contained in:
John Kitchin 2016-03-28 15:06:51 -04:00 committed by Nicolas Goaziou
parent 2ce1fc2c0d
commit 8f4f7dfd14
1 changed files with 10 additions and 2 deletions

View File

@ -3153,11 +3153,19 @@ holding contextual information."
;;;; Quote Block
(defun org-html-quote-block (_quote-block contents _info)
(defun org-html-quote-block (quote-block contents _info)
"Transcode a QUOTE-BLOCK element from Org to HTML.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(format "<blockquote>\n%s</blockquote>" contents))
(format "<blockquote%s>\n%s</blockquote>"
(let* ((name (org-element-property :name quote-block))
(attributes (org-export-read-attribute :attr_html quote-block))
(a (org-html--make-attribute-string
(if (or (not name) (plist-member attributes :id))
attributes
(plist-put attributes :id name)))))
(if (org-string-nw-p a) (concat " " a) ""))
contents))
;;;; Section