Browse Source

ob.el (org-babel-named-src-block-regexp-for-name): Generate a more general regexp

* ob.el (org-babel-named-src-block-regexp-for-name): Generate
a more general regexp.

Thanks to Loris Bennett for reporting this, and to Nicolas Girard for
pointing out what was the problem precisely.
Bastien Guerry 12 years ago
parent
commit
a740781fe2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/ob.el

+ 1 - 1
lisp/ob.el

@@ -484,7 +484,7 @@ can not be resolved.")
 (defun org-babel-named-src-block-regexp-for-name (name)
   "This generates a regexp used to match a src block named NAME."
   (concat org-babel-src-name-regexp (regexp-quote name)
-	  "\\([ \t]\\|$\\|(\\)" ".*[\r\n]"
+	  "[ \t(]*[\r\n]\\(?:^#.*[\r\n]\\)*"
 	  (substring org-babel-src-block-regexp 1)))
 
 (defun org-babel-named-data-regexp-for-name (name)