ob-julia icon indicating copy to clipboard operation
ob-julia copied to clipboard

Tangling introduces spurious semi-colons (;)

Open ericsfraga opened this issue 4 years ago • 3 comments

Tangling a Julia src code block always prepends a semi-colon before the code. This is an artefact of handling variable settings for the src block and fails when no variables have been assigned. Note: it is not clear why semi-colons are required even when variables have been assigned using :var but I guess there may be edge cases where this matters.

ericsfraga avatar Sep 17 '21 12:09 ericsfraga

Hi, if something like https://github.com/nico202/ob-julia/commit/cd258ab274715caad6261f5335668e6785c2c895 is ok we can merge it in master (or write something more nice)

Thanks

nico202 avatar Sep 17 '21 12:09 nico202

That looks like it could be good. I'll try to test it on a few files in the next few days and inspect the output. ( Aside: until now I had the wrong repo watch setting, now I'll actually see notifications for issues I'm not involved in )

tecosaur avatar Dec 01 '21 07:12 tecosaur

For the sake of execution, it could be worth adding a nothing at the end, otherwise you get this behaviour (from current master)

image

tecosaur avatar Dec 02 '21 06:12 tecosaur