diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 603c1c356..eae36696c 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -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)