1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-12 16:24:10 +00:00

don't try to evaluate #+call lines in verbatim blocks

* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Don't limit
  in-verbatim check to inline code blocks, do lob code blocks as well.
* testing/lisp/test-ob-lob.el (test-ob-lob/do-not-eval-lob-lines-in-example-blocks-on-export):
  Test ensuring that #+call lines in verbatim blocks are not evaluated
This commit is contained in:
Eric Schulte 2011-11-18 11:30:50 -07:00
parent 1f206ed477
commit f55810593e
2 changed files with 9 additions and 1 deletions

View File

@ -184,7 +184,7 @@ options are taken from `org-babel-default-header-args'."
(goto-char start)
(while (and (< (point) end)
(re-search-forward org-babel-lob-one-liner-regexp nil t))
(unless (and (match-string 12) (org-babel-in-example-or-verbatim))
(unless (org-babel-in-example-or-verbatim)
(let* ((lob-info (org-babel-lob-get-info))
(inlinep (match-string 11))
(inline-start (match-end 11))

View File

@ -94,6 +94,14 @@
;; 10 should export
(should (re-search-forward "10" nil t))))))
(ert-deftest test-ob-lob/do-not-eval-lob-lines-in-example-blocks-on-export ()
(org-test-with-temp-text-in-file "
for export
#+begin_example
#+call: rubbish()
#+end_example"
(org-export-as-html nil)))
(provide 'test-ob-lob)
;;; test-ob-lob.el ends here