ob-R: improved prompt-stripping regexp thanks to Charles C. Berry
* lisp/ob-R.el (org-babel-R-evaluate): improved prompt-stripping regexp
This commit is contained in:
parent
f6ccee2568
commit
dc92eaa08d
|
@ -259,7 +259,8 @@ return the value of the last statement in BODY, as elisp."
|
|||
(delq nil
|
||||
(mapcar
|
||||
(lambda (line) ;; cleanup extra prompts left in output
|
||||
(if (string-match "^\\([ >]+\\)\\[[0-9]+\\]" line)
|
||||
(if (string-match
|
||||
"^\\([ ]*[>+][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line)
|
||||
(substring line (match-end 1))
|
||||
line))
|
||||
(org-babel-comint-with-output (session org-babel-R-eoe-output)
|
||||
|
|
Loading…
Reference in New Issue