Function: org-html-section
org-html-section is a byte-compiled function defined in ox-html.el.gz.
Signature
(org-html-section SECTION CONTENTS INFO)
Documentation
Transcode a SECTION element from Org to HTML.
CONTENTS holds the contents of the section. INFO is a plist holding contextual information.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-html.el.gz
;;;; Section
(defun org-html-section (section contents info)
"Transcode a SECTION element from Org to HTML.
CONTENTS holds the contents of the section. INFO is a plist
holding contextual information."
(let ((parent (org-export-get-parent-headline section)))
;; Before first headline: no container, just return CONTENTS.
(if (not parent) contents
;; Get div's class and id references.
(let* ((class-num (+ (org-export-get-relative-level parent info)
(1- (plist-get info :html-toplevel-hlevel))))
(section-number
(and (org-export-numbered-headline-p parent info)
(mapconcat
#'number-to-string
(org-export-get-headline-number parent info) "-"))))
;; Build return value.
(format "<div class=\"outline-text-%d\" id=\"text-%s\">\n%s</div>\n"
class-num
(or (org-element-property :CUSTOM_ID parent)
section-number
(org-export-get-reference parent info))
(or contents ""))))))