浏览代码

ob-R: improved prompt-stripping regexp thanks to Charles C. Berry

* lisp/ob-R.el (org-babel-R-evaluate): improved prompt-stripping
  regexp
Eric Schulte 14 年之前
父节点
当前提交
dc92eaa08d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/ob-R.el

+ 2 - 1
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)