From 5420b6cea819c054404cb90b6913f84525363622 Mon Sep 17 00:00:00 2001 From: cnngimenez Date: Sat, 15 Jan 2022 20:49:52 -0300 Subject: [PATCH] Export source block: Use caption instead of name if exists. --- ox-gemini.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ox-gemini.el b/ox-gemini.el index 07081da..3b2f8db 100644 --- a/ox-gemini.el +++ b/ox-gemini.el @@ -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 "")