瀏覽代碼

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 12 年之前
父節點
當前提交
b019cab9de
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      lisp/ox-html.el

+ 8 - 6
lisp/ox-html.el

@@ -2200,9 +2200,7 @@ holding contextual information."
 	     (level1 (+ level (1- org-html-toplevel-hlevel)))
 	     (first-content (car (org-element-contents headline))))
 	(format "<%s id=\"%s\" class=\"%s\">%s%s</%s>\n"
-		(if (= 1 (org-export-get-relative-level headline info))
-		    (plist-get info :html-container)
-		  "div")
+		(org-html--container headline info)
 		(format "outline-container-%s"
 			(or (org-element-property :CUSTOM_ID headline)
 			    (concat "sec-" section-number)))
@@ -2227,9 +2225,13 @@ holding contextual information."
 		    (concat (org-html-section first-content "" info)
 			    contents)
 		  contents)
-		(if (= 1 (org-export-get-relative-level headline info))
-		    (plist-get info :html-container)
-		  "div")))))))
+		(org-html--container headline info)))))))
+
+(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