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:
Eric Schulte 2010-07-28 08:05:30 -06:00
parent f6ccee2568
commit dc92eaa08d
1 changed files with 2 additions and 1 deletions

View File

@ -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)