summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-04 18:02:54 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-04 18:02:54 +0100
commit0e5e01ba76c9f3ade9ff4c728b4caf54c5d27902 (patch)
treeb2cd4ff17bf486d7a5a05d9dafe1896290928dc5
parent87836e14e63c414be3ed88f393de56acee2d59f7 (diff)
parent70dde3f6174c701f7712cd77eb522a65dbcd2b52 (diff)
downloadorg-mode-0e5e01ba76c9f3ade9ff4c728b4caf54c5d27902.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ob-core.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 5b942ee..e6f0edb 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -175,9 +175,14 @@ This string must include a \"%s\" which will be replaced by the results."
:safe #'booleanp)
(defun org-babel-noweb-wrap (&optional regexp)
- (concat org-babel-noweb-wrap-start
- (or regexp "\\([^ \t\n].+?[^ \t]\\|[^ \t\n]\\)")
- org-babel-noweb-wrap-end))
+ "Return regexp matching a Noweb reference.
+
+Match any reference, or only those matching REGEXP, if non-nil.
+
+When matching, reference is stored in match group 1."
+ (concat (regexp-quote org-babel-noweb-wrap-start)
+ (or regexp "\\([^ \t\n]\\(?:.*?[^ \t\n]\\)?\\)")
+ (regexp-quote org-babel-noweb-wrap-end)))
(defvar org-babel-src-name-regexp
"^[ \t]*#\\+name:[ \t]*"