Преглед на файлове

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)$".
Oleh Krehel преди 11 години
родител
ревизия
7ea6c3cf38
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      lisp/ob-J.el

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