ede icon indicating copy to clipboard operation
ede copied to clipboard

Granular whitespace control

Open brendanhay opened this issue 11 years ago • 1 comments

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.

brendanhay avatar Jan 27 '14 10:01 brendanhay

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.

brendanhay avatar Oct 14 '14 14:10 brendanhay