瀏覽代碼

Merge branch 'maint'

Nicolas Goaziou 10 年之前
父節點
當前提交
3953cb19b4
共有 1 個文件被更改,包括 1 次插入1 次删除
  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."