forked from mirrors/org-mode
Allow setting :HTML_CONTAINER as a per-headline property.
* lisp/ox-html.el (org-html-headline): Use (new) org-html--container function to set container element. (org-html--container): Returns appropriate element for headline container: 1. The element set on the headline :HTML_CONTAINER property. 2. the :html-container element (if the relative headline level is 1.) 3. The default ("div").
This commit is contained in:
parent
6e1a39bd6e
commit
db8d3f5dcf
|
@ -2200,9 +2200,7 @@ holding contextual information."
|
||||||
(level1 (+ level (1- org-html-toplevel-hlevel)))
|
(level1 (+ level (1- org-html-toplevel-hlevel)))
|
||||||
(first-content (car (org-element-contents headline))))
|
(first-content (car (org-element-contents headline))))
|
||||||
(format "<%s id=\"%s\" class=\"%s\">%s%s</%s>\n"
|
(format "<%s id=\"%s\" class=\"%s\">%s%s</%s>\n"
|
||||||
(if (= 1 (org-export-get-relative-level headline info))
|
(org-html--container headline info)
|
||||||
(plist-get info :html-container)
|
|
||||||
"div")
|
|
||||||
(format "outline-container-%s"
|
(format "outline-container-%s"
|
||||||
(or (org-element-property :CUSTOM_ID headline)
|
(or (org-element-property :CUSTOM_ID headline)
|
||||||
(concat "sec-" section-number)))
|
(concat "sec-" section-number)))
|
||||||
|
@ -2227,9 +2225,13 @@ holding contextual information."
|
||||||
(concat (org-html-section first-content "" info)
|
(concat (org-html-section first-content "" info)
|
||||||
contents)
|
contents)
|
||||||
contents)
|
contents)
|
||||||
(if (= 1 (org-export-get-relative-level headline info))
|
(org-html--container headline info)))))))
|
||||||
(plist-get info :html-container)
|
|
||||||
"div")))))))
|
(defun org-html--container (headline info)
|
||||||
|
(or (org-element-property :HTML_CONTAINER headline)
|
||||||
|
(if (= 1 (org-export-get-relative-level headline info))
|
||||||
|
(plist-get info :html-container)
|
||||||
|
"div")))
|
||||||
|
|
||||||
;;;; Horizontal Rule
|
;;;; Horizontal Rule
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue