瀏覽代碼

if a code block has a body, its last character must be a newline

* lisp/ob.el (org-babel-src-block-regexp): If a code block has a body,
  its last character must be a newline.
Eric Schulte 13 年之前
父節點
當前提交
274823c858
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/ob.el

+ 1 - 1
lisp/ob.el

@@ -138,7 +138,7 @@ remove code block execution from the C-c C-c keybinding."
    ;; (4) header arguments
    ;; (4) header arguments
    "\\([^\n]*\\)\n"
    "\\([^\n]*\\)\n"
    ;; (5) body
    ;; (5) body
-   "\\([^\000]*?\\)[ \t]*#\\+end_src")
+   "\\([^\000]*?\n\\)?[ \t]*#\\+end_src")
   "Regexp used to identify code blocks.")
   "Regexp used to identify code blocks.")
 
 
 (eval-when-compile
 (eval-when-compile