Use #+name: to add names to exported code blocks.
This commit is contained in:
parent
149c38ebf3
commit
3f1aabc140
12
ox-gemini.el
12
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."
|
||||||
(org-remove-indentation
|
(let ((name (org-element-property :name src-block)))
|
||||||
(format "```\n%s```"
|
(org-remove-indentation
|
||||||
(org-export-format-code-default example-block info))))
|
(format "```%s\n%s```"
|
||||||
|
(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