org-exp-generic.el: Fix bug with closing bodies

Reported by Christian Lasarczyk, patch by Wes Hardaker
This commit is contained in:
Carsten Dominik 2010-01-08 17:34:44 +01:00
parent e5a874e417
commit 588a42d4fd
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2010-01-08 Carsten Dominik <carsten.dominik@gmail.com>
* lisp/org-export-generic.el (org-export-generic): Close body
levels.
2009-11-20 Carsten Dominik <carsten.dominik@gmail.com>
* lisp/org-export-generic.el (org-set-generic-type): Use `aput'.

View file

@ -949,6 +949,15 @@ underlined headlines. The default is 3."
(org-export-generic-wrap line bodylinewrap))
(setq line line)))
(insert (format bodylineform line)))))
;; if we're at a level > 0; insert the closing body level stuff
(let ((counter 0))
(while (> (- level counter) 0)
(insert
(org-export-generic-format export-plist :body-section-suffix 0
(- level counter)))
(setq counter (1+ counter))))
(org-export-generic-check-section "bottom")
(org-export-generic-push-links (nreverse link-buffer))