From ecd801ab199624f8ce664d719a807cfe85098e5e Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 15 Nov 2008 15:40:18 +0100 Subject: [PATCH] Avoid line 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 should not be present. --- lisp/ChangeLog | 5 +++++ lisp/org-exp.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 42816695d..f4cbe6c46 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-11-15 Carsten Dominik + + * org-exp.el (org-export-as-html): Avoid lone when no + headlines are created. + 2008-11-14 Carsten Dominik * org.el (org-link-translation-function): New option. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 04a1ded08..a2d10fd85 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -3511,7 +3511,7 @@ lang=\"%s\" xml:lang=\"%s\"> (and org-export-with-toc (<= level umax)) head-count) ;; the to close the last text-... div. - (insert "\n") + (when (and (> umax 0) first-heading-pos) (insert "\n")) (save-excursion (goto-char (point-min))