Explorar el Código

ob-core.el (org-babel-insert-result): Fix bug when inserting results as a list: ensure we split a string containing "\n"

* ob-core.el (org-babel-insert-result): Fix bug when inserting
results as a list: ensure we split a string containing "\n".

Thanks to Sébastien Vauban for reporting this.
Bastien Guerry hace 12 años
padre
commit
3d994a602c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lisp/ob-core.el

+ 1 - 1
lisp/ob-core.el

@@ -2045,7 +2045,7 @@ code ---- the results are extracted in the syntax of the source
 		     (cons 'unordered
 			   (mapcar
 			    (lambda (el) (list nil (if (stringp el) el (format "%S" el))))
-			    (if (listp result) result (list result))))
+			    (if (listp result) result (split-string result "\n" t))))
 		     '(:splicep nil :istart "- " :iend "\n")))
 		   "\n"))
 		 ;; assume the result is a table if it's not a string