I'm thinking about using DotLiquid for rendering some plain text files.
How exactly are line breaks handled?
If I do this:
--- SNIP ---
xxx
{% if false %}
{% endif %}
yyy
--- SNIP ---
I get:
--- SNIP ---
xxx
yyy
--- SNIP ---
...but I would expect to get no empty line between "xxx" and "yyy".
And it gets even worse in this case:
--- SNIP ---
xxx
{% if true %}
--------------
{% endif %}
yyy
--- SNIP ---
becomes:
--- SNIP ---
xxx
--------------
yyy
--- SNIP ---
(Snippets are only indented in this posting)
Tobias
> You can put a hyphen before the end of each tag, and that will suppress the
> line breaks that would normally be there:
> Hope that helps,
It did. Thanks a lot!
> Incidentally, that example is from the Try Online
Looks like this is the only reference to the usage of the hyphen. I
couldn't find it anywhere else in the docs.
I wanted to add it to the Wiki, but this belongs to the Ruby version of
Liquid which doesn't seem to support the hyphen.
Tobias