From 9aa69058bc4cbe3be088df9e96b18caf5359a3a8 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 7 May 2015 01:16:32 +0200 Subject: [PATCH] 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 --- lisp/org-list.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index cbd65deae..d18dff1f1 100644 --- a/lisp/org-list.el +++ b/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)))) -- 2.11.4.GIT