1 line
946 B
Plaintext
1 line
946 B
Plaintext
<!-- SC_OFF --><div class="md"><p>When using the result of another code block i find i want to transform the value slightly before using it, in particular I want to trim off a newline. I have a feeling this ought to be a common case, but I can't find any information on how to do it.</p> <p>For instance, in something like this, where <code>bar</code> refers to another (named) block and thus has a trailing newline.</p> <p>```</p> <h1>+header: :var foo=bar</h1> <h1>+begin_src http :pretty</h1> <p>POST http://localhost:3000/api/${too}/run</p> <h1>+end_src</h1> <p>```</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/magthe0"> /u/magthe0 </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/rtfzey/transforming_variables_to_code_blocks/">[link]</a></span>   <span><a href="https://www.reddit.com/r/orgmode/comments/rtfzey/transforming_variables_to_code_blocks/">[comments]</a></span> |