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 13 năm trước cách đây
mục cha
commit
a740781fe2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)