Browse Source

org-babel: bugfix: tighten up regexp

Prior to this, reference resolution could fail with quoted
strings. E.g. this didn't work:

\#+srcname: py-id(a=1)
\#+begin_src python
  a
\#+end_src

\#+lob: py-id(a="1")
Dan Davison 15 years ago
parent
commit
286bf35fe5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      contrib/babel/lisp/org-babel-ref.el

+ 1 - 1
contrib/babel/lisp/org-babel-ref.el

@@ -83,7 +83,7 @@ resource.  If REF is literal then return it's value, otherwise
 return nil."
   (let ((out (org-babel-read ref)))
     (if (equal out ref)
-        (if (string-match "\"\\(.+\\)\"" ref)
+        (if (string-match "^\".+\"$" ref)
             (read ref))
       out)))