ob-core.el: Respect `org-babel-tangle-uncomment-comments'

* lisp/ob-core.el (org-babel-expand-noweb-references): Respect
`org-babel-tangle-uncomment-comments'.

Thanks to Immanuel Litzroth for reporting this.
This commit is contained in:
Bastien 2020-02-11 14:35:30 +01:00
parent 5acf4d4692
commit 713c8d5aba
1 changed files with 6 additions and 5 deletions

View File

@ -2764,11 +2764,12 @@ block but are passed literally to the \"example-block\"."
(lambda (s)
;; Comment, according to LANG mode,
;; string S. Return new string.
(with-temp-buffer
(funcall (org-src-get-lang-mode lang))
(comment-region (point)
(progn (insert s) (point)))
(org-trim (buffer-string)))))
(unless org-babel-tangle-uncomment-comments
(with-temp-buffer
(funcall (org-src-get-lang-mode lang))
(comment-region (point)
(progn (insert s) (point)))
(org-trim (buffer-string))))))
(expand-body
(lambda (i)
;; Expand body of code blocked