[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 9a3dd429bb: org-babel-import-elisp-from-file: Fix w
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 9a3dd429bb: org-babel-import-elisp-from-file: Fix when \"s are not around |
Date: |
Sun, 23 Oct 2022 02:57:50 -0400 (EDT) |
branch: externals/org
commit 9a3dd429bb1932e48cb8997d0b9edca12ad2e627
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-babel-import-elisp-from-file: Fix when \"s are not around
* lisp/ob-core.el (org-babel-string-read): Only considered \" at the
string boundaries, not inside.
* testing/lisp/test-ob-shell.el (ob-shell/results-table): Add a test.
---
lisp/ob-core.el | 2 +-
testing/lisp/test-ob-shell.el | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 89a9b1f5a7..bd478aad52 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3205,7 +3205,7 @@ If the table is trivial, then return it as a scalar."
(defun org-babel-string-read (cell)
"Strip nested \"s from around strings."
(org-babel-read (or (and (stringp cell)
- (string-match "\"\\(.+\\)\"" cell)
+ (string-match
"^[[:space:]]*\"\\(.+\\)\"[[:space:]]*$" cell)
(match-string 1 cell))
cell) t))
diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el
index e25a01c6f7..4c00faa498 100644
--- a/testing/lisp/test-ob-shell.el
+++ b/testing/lisp/test-ob-shell.el
@@ -162,6 +162,15 @@ ob-comint.el, which was not previously tested."
"\nhello tramp from " (file-local-name
default-directory))))
(should (equal result expected)))))))
+(ert-deftest ob-shell/results-table ()
+ "Test :results table."
+ (should
+ (equal '(("I \"want\" it all"))
+ (org-test-with-temp-text
+ "#+BEGIN_SRC sh :results table\necho 'I \"want\" it
all'\n#+END_SRC"
+ (org-babel-execute-src-block)))))
+
+
(provide 'test-ob-shell)
;;; test-ob-shell.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 9a3dd429bb: org-babel-import-elisp-from-file: Fix when \"s are not around,
ELPA Syncer <=