MT <[email protected]> writes:
> Regarding your question
>
>> Could you please explain why we do not want to add empty line in all
>> cases (after interposing the prefix)? What is the logic behind "block
>> body does not end with noweb reference"?
>
> Before:
> 1. =expand-body= (which calls =add-comment=) adds an empty line at the end of
> the expansion. (=org-babel-expand-noweb-references=, lisp/ob-core.el). The
> expanded body is then interposed if Noweb prefix is kept. The result is
> that, the empty line at the end of the expanded body is also interposed.
>
> Consider this example in my commit message:
> ...
Ok, got it.
The code still feels a bit weird to me, but I do not see any counterexamples.
I applied the first 2 patches onto main (others do not apply), and there
is one test failing:
1 unexpected results:
FAILED ob-java/tangle ((should (string= "public class Tangle {\n public
static void main(String[] args) {\n return \"tangled\";\n }\n}\n"
(unwind-protect (progn (org-babel-tangle) (with-temp-buffer ... ... ...))
(delete-file "Tangle.java")))) :form (string= "public class Tangle {\n
public static void main(String[] args) {\n return \"tangled\";\n
}\n}\n" "\npublic class Tangle {\n public static void main(String[] args)
{\n return \"tangled\";\n }\n}\n") :value nil :explanation
(arrays-of-different-length 101 102 "public class Tangle {\n public static
void main(String[] args) {\n return \"tangled\";\n }\n}\n" "\npublic
class Tangle {\n public static void main(String[] args) {\n return
\"tangled\";\n }\n}\n" first-mismatch-at 0))
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>