فهرست منبع

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

Nicolas Goaziou 14 سال پیش
والد
کامیت
bfce8dd357
2فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 4 1
      lisp/org-docbook.el
  2. 4 1
      lisp/org-html.el

+ 4 - 1
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)

+ 4 - 1
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)))