fix code block replacement with results

* lisp/ob.el (org-babel-find-named-result): Fix code block replacement
  with results.
This commit is contained in:
Eric Schulte 2012-03-03 07:35:12 -07:00
parent 155ab73f77
commit 951a6f2506
1 changed files with 2 additions and 1 deletions

View File

@ -1497,7 +1497,8 @@ buffer or nil if no such result exists."
(concat org-babel-result-regexp
"[ \t]" (regexp-quote name) "[ \t\n\f\v\r]+") nil t)
(when (and (string= "name" (downcase (match-string 1)))
(or (looking-at org-babel-src-block-regexp)
(or (beginning-of-line 1)
(looking-at org-babel-src-block-regexp)
(looking-at org-babel-multi-line-header-regexp)))
(throw 'is-a-code-block (org-babel-find-named-result name (point))))
(beginning-of-line 0) (point)))))