Browse Source

LaTeX export: leave empty lines after list in place

Nicolas Girard writes:

> My point was, in the following two examples, the empty lines right
> before "C" should be preserved in the LaTeX output.
>
> Cheers,
> Nicolas
>
> #===
> - A2
> - B2
>
> C
> #===
>
>
> #===
> - A3
> - B3
>
>
> C
> #===
Carsten Dominik 15 years ago
parent
commit
eb5cefed26
2 changed files with 7 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 4 1
      lisp/org-list.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-12-03  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-list.el (org-list-parse-list): Leave empty lines after the
+	list, don't consider them as part of the list.
+
 	* org-mobile.el (org-mobile-sumo-agenda-command): Allow tagstodo
 	searches.
 

+ 4 - 1
lisp/org-list.el

@@ -1083,7 +1083,10 @@ Return a list containing first level items as strings and
 sublevels as a list of strings."
   (let* ((item-beginning (org-list-item-beginning))
 	 (start (car item-beginning))
-	 (end (org-list-end (cdr item-beginning)))
+	 (end (save-excursion
+		(goto-char (org-list-end (cdr item-beginning)))
+		(org-back-over-empty-lines)
+		(point)))
 	 output itemsep ltype)
     (while (re-search-forward org-list-beginning-re end t)
       (goto-char (match-beginning 3))