Open gentisaliu opened 9 years ago
Twig 1.1 introduced tag-level whitespace control which works by adding a minus ("-") to the curly brackets as below:
{% set value = 'no spaces' %} {#- No leading/trailing whitespace -#} {%- if true -%} {{- value -}} {%- endif -%} {# output 'no spaces' #}
Also see the documentation.
Does MtHamlBundle/MtHaml support these at this time? I realize this should be challenging, considering the HAML syntax.
It does, but only partially and it's not particularly elegant:
-- if true - = value
The above compiles to:
{%- if true -%} {{ value }} {% endif %}
Twig 1.1 introduced tag-level whitespace control which works by adding a minus ("-") to the curly brackets as below:
Also see the documentation.
Does MtHamlBundle/MtHaml support these at this time? I realize this should be challenging, considering the HAML syntax.