babel: Fix unquoting of strings

Before this change we have

 #+begin_src ruby :results value :session
 ["1", "3"]
 #+end_src

 #+results:
 : 1", "3

 After, we have

 #+begin_src ruby :results value :session
 ["1", "3"]
 #+end_src

 #+results:
 | 1 | 3 |
This commit is contained in:
Dan Davison 2010-02-19 11:34:16 -05:00
parent 6f62066ac6
commit a95c05773e
3 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@
(defun org-babel-haskell-read-string (string)
"Strip \\\"s from around haskell string"
(if (string-match "\"\\([^\000]+\\)\"" string)
(if (string-match "^\"\\([^\000]+\\)\"$" string)
(match-string 1 string)
string))

View File

@ -208,8 +208,8 @@ last statement in BODY, as elisp."
(org-babel-python-table-or-string (org-babel-trim (car results))))))))))
(defun org-babel-python-read-string (string)
"Strip 's from around ruby string"
(if (string-match "'\\([^\000]+\\)'" string)
"Strip 's from around python string"
(if (string-match "^'\\([^\000]+\\)'$" string)
(match-string 1 string)
string))

View File

@ -202,7 +202,7 @@ last statement in BODY, as elisp."
(defun org-babel-ruby-read-string (string)
"Strip \\\"s from around ruby string"
(if (string-match "\"\\([^\000]+\\)\"" string)
(if (string-match "^\"\\([^\000]+\\)\"$" string)
(match-string 1 string)
string))