Function: org-texinfo--normalize-headlines
org-texinfo--normalize-headlines is a byte-compiled function defined
in ox-texinfo.el.gz.
Signature
(org-texinfo--normalize-headlines TREE BACKEND INFO)
Documentation
Normalize headlines in TREE.
BACK-END is the symbol specifying back-end used for export. INFO is a plist used as a communication channel.
Make sure every headline in TREE contains a section, since those are required to install a menu. Also put exactly one blank line at the end of each section.
Return new tree.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-texinfo.el.gz
(defun org-texinfo--normalize-headlines (tree _backend info)
"Normalize headlines in TREE.
BACK-END is the symbol specifying back-end used for export.
INFO is a plist used as a communication channel.
Make sure every headline in TREE contains a section, since those
are required to install a menu. Also put exactly one blank line
at the end of each section.
Return new tree."
(org-element-map tree 'headline
(lambda (hl)
(org-element-put-property hl :post-blank 1)
(let ((contents (org-element-contents hl)))
(when contents
(let ((first (org-element-map contents '(headline section)
#'identity info t)))
(unless (eq (org-element-type first) 'section)
(apply #'org-element-set-contents
hl
(cons `(section (:parent ,hl)) contents)))))))
info)
tree)