leave a blank line after the link blocks

Signed-off-by: Justin Abrahms <justin@abrah.ms>
This commit is contained in:
Omar Polo 2021-08-11 08:04:33 +00:00 committed by Justin Abrahms
parent 4572682a99
commit 8bbc1c9f6d

View File

@ -83,21 +83,24 @@
"Describe links is the footer-portion of the link data. "Describe links is the footer-portion of the link data.
It's output just before each section. LINKS is a list of each link. INFO is a plist." It's output just before each section. LINKS is a list of each link. INFO is a plist."
(mapconcat (concat
(lambda (link) (mapconcat
(let* ((raw-path (org-element-property :raw-link link)) (lambda (link)
(link-type (org-element-property :type link)) (let* ((raw-path (org-element-property :raw-link link))
(is-org-file-link (and (string= "file" link-type) (link-type (org-element-property :type link))
(string= ".org" (downcase (file-name-extension raw-path "."))))) (is-org-file-link (and (string= "file" link-type)
(path (if is-org-file-link (string= ".org" (downcase (file-name-extension raw-path ".")))))
(concat (file-name-sans-extension (org-element-property :path link)) ".gmi") (path (if is-org-file-link
raw-path)) (concat (file-name-sans-extension (org-element-property :path link)) ".gmi")
(desc (org-element-contents link)) raw-path))
(anchor (org-export-data (desc (org-element-contents link))
(or desc (org-element-property :raw-link link)) (anchor (org-export-data
info))) (or desc (org-element-property :raw-link link))
(format "=> %s %s\n" path anchor))) info)))
links "")) (format "=> %s %s\n" path anchor)))
links "")
(when (car links)
"\n")))
(defun org-gemini-link (_link desc _info) (defun org-gemini-link (_link desc _info)