Browse Source

Better handling of non-blank-lines types of list enders.

* org-exp.el (org-export-mark-list-ending): fix number of blank lines
  inserted after a list.
* org-list.el (org-list-parse-list): fix case when `org-list-end-re'
  would have an indentation greater than current list.
Nicolas Goaziou 15 years ago
parent
commit
a63ecfa89b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lisp/org-exp.el
  2. 1 1
      lisp/org-list.el

+ 1 - 1
lisp/org-exp.el

@@ -1651,7 +1651,7 @@ These special cookies will later be interpreted by the backend.
     (funcall process-buffer "ORG-LIST-END\n"))
    ;; 3. Others backends do not need to know this: clean list enders.
    (t
-    (funcall process-buffer "\n")))))
+    (funcall process-buffer "")))))
 
 (defun org-export-attach-captions-and-attributes (backend target-alist)
   "Move #+CAPTION, #+ATTR_BACKEND, and #+LABEL text into text properties.

+ 1 - 1
lisp/org-list.el

@@ -1319,7 +1319,7 @@ sublevels as a list of strings."
       (let* ((indent1 (org-get-indentation))
 	     (nextitem (or (org-get-next-item (point) end) end))
 	     (item (org-trim (buffer-substring (point) (org-end-of-item-text-before-children))))
-	     (nextindent (org-get-indentation))
+	     (nextindent (if (= (point) end) 0 (org-get-indentation)))
 	     (item (if (string-match "^\\[\\([xX ]\\)\\]" item)
 		       (replace-match (if (equal (match-string 1 item) " ")
 					  "[CBOFF]"