")))
- (insert ""))
(backward-char 1)))
;; Fill empty sections with . This is to make sure
;; that the DocBook document generated is valid and well-formed.
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 7ed3f2ada..a7199e26b 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1719,16 +1719,16 @@ lang=\"%s\" xml:lang=\"%s\">
(goto-char (match-end 0))
(insert "\n")))
(insert "\n")
- (mapc 'insert thetoc)
- (insert "
\n"))
- ;; remove empty paragraphs and lists
+ (let ((beg (point)))
+ (mapc 'insert thetoc)
+ (insert "\n")
+ (while (re-search-backward "[ \r\n\t]*\n?" beg t)
+ (replace-match ""))))
+ ;; remove empty paragraphs
(goto-char (point-min))
(while (re-search-forward "[ \r\n\t]*
" nil t)
(replace-match ""))
(goto-char (point-min))
- (while (re-search-forward "[ \r\n\t]*\n?" nil t)
- (replace-match ""))
- (goto-char (point-min))
;; Convert whitespace place holders
(goto-char (point-min))
(let (beg end n)
@@ -2440,7 +2440,7 @@ the alist of previous items."
(let* ((counter (match-string 2 line))
(checkbox (match-string 3 line))
(desc-tag (or (match-string 4 line) "???"))
- (body (match-string 5 line))
+ (body (or (match-string 5 line) ""))
(list-beg (org-list-get-list-begin pos struct prevs))
(firstp (= list-beg pos))
;; Always refer to first item to determine list type, in