babel: can now find table and result lines which don't start on column 0

* contrib/babel/lisp/org-babel-ref.el (org-babel-ref-resolve-reference):
  now able to recognize #+tblname, #+resname and #+results lines which
  do not start on column 0
This commit is contained in:
Eric Schulte 2010-06-10 09:45:06 -07:00
parent 799c15ffaf
commit 9a3e9ad865
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ return nil."
(save-restriction (save-restriction
(widen) (widen)
(goto-char (point-min)) (goto-char (point-min))
(if (let ((result_regexp (concat "^#\\+\\(TBLNAME\\|RESNAME\\|RESULTS\\):[ \t]*" (if (let ((result_regexp (concat "^[ \t]*#\\+\\(TBLNAME\\|RESNAME\\|RESULTS\\):[ \t]*"
(regexp-quote ref) "[ \t]*$")) (regexp-quote ref) "[ \t]*$"))
(regexp (concat org-babel-source-name-regexp (regexp (concat org-babel-source-name-regexp
(regexp-quote ref) "\\(\(.*\)\\)?" "[ \t]*$"))) (regexp-quote ref) "\\(\(.*\)\\)?" "[ \t]*$")))