forked from mirrors/org-mode
ob: Fix case when replacing Noweb reference
* lisp/ob-core.el (org-babel-expand-noweb-references): Use FIXEDCASE. * testing/lisp/test-ob.el (test-ob/noweb-expansion): Add test. Reported-by: Sebastian Miele <sebastian.miele@gmail.com> <http://lists.gnu.org/r/emacs-orgmode/2020-03/msg00070.html>
This commit is contained in:
parent
8b67d79c3b
commit
e18415d02c
|
@ -2812,7 +2812,7 @@ block but are passed literally to the \"example-block\"."
|
|||
(mapconcat #'identity
|
||||
(split-string expansion "[\n\r]")
|
||||
(concat "\n" prefix))))))
|
||||
body nil t 2)))
|
||||
body t t 2)))
|
||||
|
||||
(defun org-babel--script-escape-inner (str)
|
||||
(let (in-single in-double backslash out)
|
||||
|
|
|
@ -782,6 +782,18 @@ x
|
|||
* C
|
||||
#+begin_src emacs-lisp :noweb-ref foo
|
||||
C
|
||||
#+end_src"
|
||||
(org-babel-expand-noweb-references))))
|
||||
;; Preserve case when replacing Noweb reference.
|
||||
(should
|
||||
(equal "(ignore)"
|
||||
(org-test-with-temp-text "
|
||||
#+begin_src emacs-lisp :noweb-ref AA
|
||||
\(ignore)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp :noweb yes<point>
|
||||
<<AA>>
|
||||
#+end_src"
|
||||
(org-babel-expand-noweb-references)))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue