How do I export without all the newlines?

When I put ^action^ and ^if^ on their own lines (and probably other export codes), they add newlines in the export, which I don’t want. For example, the following code:

So many...
^action()^
^action()^
^value('chicken')^
...blank lines

produces:

<p>So many...</p>


chicken
<p>...blank lines</p>

I don’t want those extra blank lines in there. The only way I’ve figured out how to avoid them is to put all the action code on a single line with no spaces:

No more...
^action()^^action()^^value('chicken')^
...blank lines

produces:

<p>No more...</p>
chicken
<p>...blank lines</p>

Is there a way to prevent ^if^ / ^action^ / etc from emitting a newline even when they’re on their own line, so that I don’t have to mash all of the export codes onto a single line?

Short answer - you can have nicely laid-out action/export code or nicely formatted output. Not both! I tend to write complex bits of export code so I can follow my plan of execution then once general output is OK, adjust the line break locations to the output looks correct.

1 Like