summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleh Krehel <ohwoeowho@gmail.com>2013-12-23 14:35:02 +0100
committerOleh Krehel <ohwoeowho@gmail.com>2013-12-23 14:39:43 +0100
commit7ea6c3cf38d19fd9265fe38df5e81cf05d3e521c (patch)
tree104fa0d297846d8389fa8d53db251c412fb5be97
parentd4710bd0aa8d73b682bac0b1bba433f8b9cd41ff (diff)
downloadorg-mode-7ea6c3cf38d19fd9265fe38df5e81cf05d3e521c.tar.gz
ob-J: Fix explicit body regexp.
* lisp/ob-J.el (org-babel-J-interleave-echos-except-functions): Explicit body has to end either with "\n)\n" or with "\n)$".
-rw-r--r--lisp/ob-J.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob-J.el b/lisp/ob-J.el
index f57f5a5..67a23c2 100644
--- a/lisp/ob-J.el
+++ b/lisp/ob-J.el
@@ -39,7 +39,7 @@ PROCESSED-PARAMS isn't used yet."
(defun org-babel-J-interleave-echos-except-functions (body)
"Interleave echo'' between source lines of BODY that aren't functions."
- (if (obj-string-match-m "\\(?:^\\|\n\\)[^\n]*\\(?:1\\|2\\|3\\|4\\) : 0\n.*)" body)
+ (if (obj-string-match-m "\\(?:^\\|\n\\)[^\n]*\\(?:1\\|2\\|3\\|4\\) : 0\n.*)\\(?:\n\\|$\\)" body)
(let ((s1 (substring body 0 (match-beginning 0)))
(s2 (match-string 0 body))
(s3 (substring body (match-end 0))))