mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-04 15:41:37 -05:00
jupyter-org-result (text/plain): Be stricter with usage of org-babel-script-escape
This commit is contained in:
parent
0dd3946e1e
commit
09ebdac3f0
1 changed files with 8 additions and 1 deletions
|
@ -844,7 +844,14 @@ new \"scalar\" result with the result of calling
|
|||
(let ((result (cl-call-next-method)))
|
||||
(jupyter-org-scalar
|
||||
(cond
|
||||
((stringp result) (org-babel-script-escape result))
|
||||
((and (stringp result)
|
||||
;; Be a little more stringent than `org-babel-script-escape'. It
|
||||
;; gives bad results on the following
|
||||
;;
|
||||
;; [1] Foo bar
|
||||
(memq (aref result 0) '(?\[ ?\{ ?\())
|
||||
(eq (aref result 0) (aref result (1- (length result)))))
|
||||
(org-babel-script-escape result))
|
||||
(t result)))))
|
||||
|
||||
(cl-defmethod jupyter-org-result ((_mime (eql :text/plain)) _params data
|
||||
|
|
Loading…
Add table
Reference in a new issue