1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-25 07:27:57 +00:00

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

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