浏览代码

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 10 年之前
父节点
当前提交
cad2400443
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      lisp/ob-js.el

+ 4 - 3
lisp/ob-js.el

@@ -97,14 +97,15 @@ This function is called by `org-babel-execute-src-block'"
 If RESULTS look like a table, then convert them into an
 Emacs-lisp table, otherwise return the results as a string."
   (org-babel-read
-   (if (and (stringp results) (string-match "^\\[.+\\]$" results))
+   (if (and (stringp results) (string-match "^\\[[^\000]+\\]$" results))
        (org-babel-read
         (concat "'"
                 (replace-regexp-in-string
                  "\\[" "(" (replace-regexp-in-string
                             "\\]" ")" (replace-regexp-in-string
-                                       ", " " " (replace-regexp-in-string
-						 "'" "\"" results))))))
+                                       ",[[:space:]]" " "
+				       (replace-regexp-in-string
+					"'" "\"" results))))))
      results)))
 
 (defun org-babel-js-var-to-js (var)