Explorar o código

Merge branch 'maint'

Nicolas Goaziou %!s(int64=10) %!d(string=hai) anos
pai
achega
3953cb19b4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/ob-js.el

+ 1 - 1
lisp/ob-js.el

@@ -114,7 +114,7 @@ Convert an elisp value into a string of js source code
 specifying a variable of the same value."
   (if (listp var)
       (concat "[" (mapconcat #'org-babel-js-var-to-js var ", ") "]")
-    (format "%S" var)))
+    (replace-regexp-in-string "\n" "\\\\n" (format "%S" var))))
 
 (defun org-babel-prep-session:js (session params)
   "Prepare SESSION according to the header arguments specified in PARAMS."