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")
This commit is contained in:
Dan Davison 2009-10-12 20:32:57 -04:00
parent 5219f4a410
commit 286bf35fe5
1 changed files with 1 additions and 1 deletions

View File

@ -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)))