Use #+name: to add names to exported code blocks.
This commit is contained in:
parent
149c38ebf3
commit
3f1aabc140
10
ox-gemini.el
10
ox-gemini.el
@ -68,11 +68,13 @@
|
|||||||
;; there's a bug here where there's a trailing space in the ``
|
;; there's a bug here where there's a trailing space in the ``
|
||||||
(format "`%s`" (org-export-format-code-default input info)))
|
(format "`%s`" (org-export-format-code-default input info)))
|
||||||
|
|
||||||
(defun org-gemini-code-block (example-block _contents info)
|
(defun org-gemini-code-block (src-block _contents info)
|
||||||
"EXAMPLE-BLOCK is a codeblock. INFO is a plist."
|
"SRC-BLOCK is a codeblock. INFO is a plist."
|
||||||
|
(let ((name (org-element-property :name src-block)))
|
||||||
(org-remove-indentation
|
(org-remove-indentation
|
||||||
(format "```\n%s```"
|
(format "```%s\n%s```"
|
||||||
(org-export-format-code-default example-block info))))
|
(or name "")
|
||||||
|
(org-export-format-code-default src-block info)))))
|
||||||
|
|
||||||
(defun org-gemini--describe-links (links _width info)
|
(defun org-gemini--describe-links (links _width info)
|
||||||
"Describe links is the footer-portion of the link data.
|
"Describe links is the footer-portion of the link data.
|
||||||
|
Loading…
Reference in New Issue
Block a user