Open markokocic opened 3 years ago
yeah, it'd be great to support what jinja calls whitespace-control!
I also bump into this issue, would be great to have this support.
I also tried something like {% if abc -%}
but it says invalid syntax..
bump the request
If a line inside a template contains only templatel directives and whitespace, the complete line should be removed from the output when rendered.
Use case 1:
template for RSS xml feed:
is rendered like
Note the empty line at the begining is making this file invalid xml file.
Use case 2:
this renders the html output like this:
While the html is valid, it looks ugly with all those empty lines.
As an (aesthetical) enhancement it would be good if templatel would not render at all line that contains only templatel tags and whitespace.