Merge branch 'maint'
This commit is contained in:
commit
774e553f11
|
@ -2790,7 +2790,9 @@ block but are passed literally to the \"example-block\"."
|
|||
(lambda (i)
|
||||
;; Expand body of code blocked
|
||||
;; represented by block info I.
|
||||
(let ((b (org-babel-expand-noweb-references i)))
|
||||
(let ((b (if (org-babel-noweb-p (nth 2 i) :eval)
|
||||
(org-babel-expand-noweb-references i)
|
||||
(nth 1 i))))
|
||||
(if (not comment) b
|
||||
(let ((cs (org-babel-tangle-comment-links i)))
|
||||
(concat (funcall c-wrap (car cs)) "\n"
|
||||
|
|
|
@ -721,7 +721,43 @@ x
|
|||
#+begin_src sh :noweb-sep \"\"
|
||||
(+ 1 1)
|
||||
#+end_src"
|
||||
(org-babel-expand-noweb-references)))))
|
||||
(org-babel-expand-noweb-references))))
|
||||
;; Handle recursive expansion.
|
||||
(should
|
||||
(equal "baz"
|
||||
(org-test-with-temp-text "
|
||||
#+begin_src emacs-lisp :noweb yes<point>
|
||||
<<foo>>
|
||||
#+end_src
|
||||
|
||||
#+name: foo
|
||||
#+begin_src emacs-lisp :noweb yes
|
||||
<<bar>>
|
||||
#+end_src
|
||||
|
||||
#+name: bar
|
||||
#+begin_src emacs-lisp
|
||||
baz
|
||||
#+end_src"
|
||||
(org-babel-expand-noweb-references))))
|
||||
;; During recursive expansion, obey to `:noweb' property.
|
||||
(should
|
||||
(equal "<<bar>>"
|
||||
(org-test-with-temp-text "
|
||||
#+begin_src emacs-lisp :noweb yes<point>
|
||||
<<foo>>
|
||||
#+end_src
|
||||
|
||||
#+name: foo
|
||||
#+begin_src emacs-lisp :noweb no
|
||||
<<bar>>
|
||||
#+end_src
|
||||
|
||||
#+name: bar
|
||||
#+begin_src emacs-lisp
|
||||
baz
|
||||
#+end_src"
|
||||
(org-babel-expand-noweb-references)))))
|
||||
|
||||
(ert-deftest test-ob/splitting-variable-lists-in-references ()
|
||||
(org-test-with-temp-text ""
|
||||
|
|
Loading…
Reference in New Issue