diff --git a/lisp/ob.el b/lisp/ob.el index 6e98263..6d2f0d0 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -138,9 +138,20 @@ remove code block execution from the C-c C-c keybinding." ;; (4) header arguments "\\([^\n]*\\)\n" ;; (5) body - "\\([^\000]+?\n\\)[ \t]*#\\+end_src") + "\\([^\000]*?\n*\\)[ \t]*#\\+end_src") "Regexp used to identify code blocks.") +(setq org-babel-src-block-regexp + (concat + ;; (1) indentation (2) lang + "^\\([ \t]*\\)#\\+begin_src[ \t]+\\([^ \f\t\n\r\v]+\\)[ \t]*" + ;; (3) switches + "\\([^\":\n]*\"[^\"\n*]*\"[^\":\n]*\\|[^\":\n]*\\)" + ;; (4) header arguments + "\\([^\n]*\\)\n" + ;; (5) body + "\\([^\000]*?\n*\\)[ \t]*#\\+end_src")) + (defvar org-babel-inline-src-block-regexp (concat ;; (1) replacement target (2) lang