Export source block: Use caption instead of name if exists.

This commit is contained in:
cnngimenez 2022-01-15 20:49:52 -03:00
parent 527ce87206
commit 5420b6cea8

View File

@ -71,7 +71,8 @@
(defun org-gemini-code-block (src-block _contents info)
"SRC-BLOCK is a codeblock. INFO is a plist."
(let ((name (org-element-property :name src-block)))
(let ((name (or (caaar (org-element-property :caption src-block))
(org-element-property :name src-block))))
(org-remove-indentation
(format "```%s\n%s```"
(or name "")