Selaa lähdekoodia

org-list: Preserve newline characters when changing description lists

* lisp/org-list.el (org-list-to-generic): Preserve newline characters
  after description in description lists.

Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97432>
Nicolas Goaziou 9 vuotta sitten
vanhempi
commit
9aa69058bc
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      lisp/org-list.el

+ 3 - 3
lisp/org-list.el

@@ -3215,13 +3215,13 @@ items."
 	       (when nobr (setq first (org-list-item-trim-br first)))
 	       ;; Insert descriptive term if TYPE is `descriptive'.
 	       (when (eq type 'descriptive)
-		 (let* ((complete (string-match "^\\(.*\\)[ \t]+::" first))
+		 (let* ((complete
+			 (string-match "^\\(.*\\)[ \t]+::[ \t]*" first))
 			(term (if complete
 				  (save-match-data
 				    (org-trim (match-string 1 first)))
 				"???"))
-			(desc (if complete
-				  (org-trim (substring first (match-end 0)))
+			(desc (if complete (substring first (match-end 0))
 				first)))
 		   (setq first (concat (eval dtstart) term (eval dtend)
 				       (eval ddstart) desc))))