This is not a TiddlyWiki issue. It is the normal behavior when rendering content for any webpage.
The basic rule of thumb is that – absent specific styling (such as <pre>...</pre>
, or CSS <span style="white-space:pre;">...</span>
or use of <br/>
or <p/>
) – all whitespace sequences (including newlines) are automatically reduced to single spaces.
Consider, if you have a regular web page (HTML file) containing:
one
two
three
four
It would produce output like this:
one two three four
(i.e, the newlines are converted to spaces and the double newlines becoming a single space)
The output you reported is caused by the newline that follows <<stuff>>
, and not because of the enclosing $wikify
(or $let, $set
, or $vars
). You would also get the same result if the newline occured outside of the enclosing $wikify
, like this:
<$wikify name="stuff" text="<<currentTiddler>>" mode="inline" output="html" >
<<stuff>></$wikify>
something
Note also that there is a newline within the $wikify
that immediately precedes the <<stuff>>
content. This will also be rendered by the browser as a space if there was any content before the $wikify
:
before<$wikify name="stuff" text="<<currentTiddler>>" mode="inline" output="html" >
<<stuff>></$wikify>after
produces:
before TiddlerNameafter
The only way to completely avoid these “added” spaces, is to not have ANY extra whitespace (includine newlines), like this:
before<$wikify name="stuff" text="<<currentTiddler>>" mode="inline" output="html" ><<stuff>></$wikify>after
which results in:
beforeTiddlerNameafter
-e