summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-08-27 11:05:58 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:56 +0200
commitbfce8dd35724a4f4f4082901db67e9409bd34025 (patch)
treeccec879270c47eb3d6f4d0660615fc6d37d35444
parent0932dac73dee1d296c15b6245101e205a51d8860 (diff)
downloadorg-mode-bfce8dd35724a4f4f4082901db67e9409bd34025.tar.gz
Do not crash when trying to export an ill-formed list in HTML and DocBook.
-rw-r--r--lisp/org-docbook.el5
-rw-r--r--lisp/org-html.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 741465e..d4668cb 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -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)
diff --git a/lisp/org-html.el b/lisp/org-html.el
index e9fcc4f..23b2729 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -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)))