Browse Source

Avoid line </div> if there is no headline.

This is a bugfix.  When the number of headline levels was set to zero,
or if there was no heading at all in the export, the final closing
</div> should not be present.
Carsten Dominik 16 years ago
parent
commit
ecd801ab19
2 changed files with 6 additions and 1 deletions
  1. 5 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-exp.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2008-11-15  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-exp.el (org-export-as-html): Avoid lone </div> when no
+	headlines are created.
+
 2008-11-14  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-link-translation-function): New option.

+ 1 - 1
lisp/org-exp.el

@@ -3511,7 +3511,7 @@ lang=\"%s\" xml:lang=\"%s\">
 			    (and org-export-with-toc (<= level umax))
 			    head-count)
       ;; the </div> to close the last text-... div.
-      (insert "</div>\n")
+      (when (and (> umax 0) first-heading-pos) (insert "</div>\n"))
 
       (save-excursion
 	(goto-char (point-min))