Do not crash when trying to export an ill-formed list in HTML and DocBook.

This commit is contained in:
Nicolas Goaziou 2010-08-27 11:05:58 +02:00
parent 0932dac73d
commit bfce8dd357
2 changed files with 8 additions and 2 deletions

View File

@ -1059,7 +1059,10 @@ publishing directory."
(setq in-local-list t))
;; Continue current list
(starter
;; terminate any previous sublist
;; terminate any previous sublist but first ensure
;; list is not ill-formed
(let ((min-ind (apply 'min local-list-indent)))
(when (< ind min-ind) (setq ind min-ind)))
(while (< ind (car local-list-indent))
(let ((listtype (car local-list-type)))
(org-export-docbook-close-li listtype)

View File

@ -1573,7 +1573,10 @@ lang=\"%s\" xml:lang=\"%s\">
(setq in-local-list t))
;; Continue list
(starter
;; terminate any previous sublist
;; terminate any previous sublist but first ensure
;; list is not ill-formed.
(let ((min-ind (apply 'min local-list-indent)))
(when (< ind min-ind) (setq ind min-ind)))
(while (< ind (car local-list-indent))
(org-close-li (car local-list-type))
(insert (format "</%sl>\n" (car local-list-type)))