mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-24 07:20:29 +00:00
ox-texinfo: Fix spurious blank lines in detailed menu.
* lisp/ox-texinfo.el (org-texinfo--build-menu): Prevent spurious blank lines in detailed menu.
This commit is contained in:
parent
8860fe2938
commit
b5f075aa05
@ -1185,19 +1185,19 @@ is an integer, build the menu recursively, down to this depth."
|
||||
(cond
|
||||
((not level)
|
||||
(org-texinfo--format-entries (org-texinfo--menu-entries scope info) info))
|
||||
((zerop level) nil)
|
||||
((zerop level) "\n")
|
||||
(t
|
||||
(org-element-normalize-string
|
||||
(mapconcat
|
||||
(lambda (h)
|
||||
(let ((entries (org-texinfo--menu-entries h info)))
|
||||
(when entries
|
||||
(concat
|
||||
(format "%s\n\n%s\n"
|
||||
(org-export-data (org-export-get-alt-title h info) info)
|
||||
(org-texinfo--format-entries entries info))
|
||||
(org-texinfo--build-menu h info (1- level))))))
|
||||
(org-texinfo--menu-entries scope info) "\n")))))
|
||||
(mapconcat
|
||||
(lambda (h)
|
||||
(let ((entries (org-texinfo--menu-entries h info)))
|
||||
(when entries
|
||||
(concat
|
||||
(format "%s\n\n%s\n"
|
||||
(org-export-data (org-export-get-alt-title h info) info)
|
||||
(org-texinfo--format-entries entries info))
|
||||
(org-texinfo--build-menu h info (1- level))))))
|
||||
(org-texinfo--menu-entries scope info)
|
||||
""))))
|
||||
|
||||
(defun org-texinfo--format-entries (entries info)
|
||||
"Format all direct menu entries in SCOPE, as a string.
|
||||
|
Loading…
Reference in New Issue
Block a user