瀏覽代碼

Export: Allow for TOC generation if body-only is set

* lisp/org-html.el (org-export-as-html): Remove the check for
body-only in the code for generating tables of contents.

The docstring for org-export-as-html states that the body-only flag
removes everything outside the <body></body> tags (inclusive).  Since
the table of contents is inside these tags, it should be exported when
requested even if the body-only flag is set.
Chris Gray 13 年之前
父節點
當前提交
6fabe46cc7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org-html.el

+ 1 - 1
lisp/org-html.el

@@ -1414,7 +1414,7 @@ PUB-DIR is set, use this as the publishing directory."
 		"\n<h1 class=\"title\">" title "</h1>\n"))
 
       ;; insert body
-      (if (and org-export-with-toc (not body-only))
+      (if org-export-with-toc
 	  (progn
 	    (push (format "<h%d>%s</h%d>\n"
 			  org-export-html-toplevel-hlevel