ede
ede copied to clipboard
Granular whitespace control
Ability to strip/preseve whitespace through the use of syntactic variations of the section tags, for example:
-
{%-
Strips any preceeding newline -
+%}
Preserves the following newline
As an aside, this work could be used to make the Parsec
based parser more robust, or switch to Attoparsec
using the line/meta information preserving behaviour of attoparsec-conduit
.
The current trifecta
based parser is a better citizen regarding whitespace and will (hopefully) do the right thing regarding single-line statements such as {% if true %} {{ var }} { % endif %}
and trailing newline/space removal for multi-line statements such as {% if true %} \n{{ var }}\n{ % endif %} \n
.