Support title/name/class for SPECIAL-BLOCK

This commit is contained in:
IGARASHI Masanao
2015-10-18 18:05:37 +09:00
parent b7a38cf7db
commit bb3766d260

View File

@@ -1309,11 +1309,21 @@ holding contextual information."
"Transcode a SPECIAL-BLOCK element from Org to reStructuredText. "Transcode a SPECIAL-BLOCK element from Org to reStructuredText.
CONTENTS holds the contents of the block. INFO is a plist CONTENTS holds the contents of the block. INFO is a plist
holding contextual information." holding contextual information."
(let ((type (org-element-property :type special-block))) (let* ((attributes
(format ".. %s::\n%s\n" (org-export-read-attribute :attr_rst special-block))
type (title (plist-get attributes :title))
(org-rst--indent-string contents org-rst-quote-margin)))) (class (plist-get attributes :class))
(label (org-element-property :name special-block))
(type (org-element-property :type special-block)))
(concat
(format ".. %s::" type)
(when title (format " %s" title))
"\n"
(when class (format " :class: %s\n" class))
(when label (format " :name: %s\n" label))
"\n"
(when contents
(org-rst--indent-string contents org-rst-quote-margin)))))
;;;; Src Block ;;;; Src Block