bug #15445 do not remove space between attributes (greg0ire)

This PR was merged into the 2.3 branch.

Discussion
----------

do not remove space between attributes

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |  n/a

This piece of code adds a space then removes it immediately. One could think that only the space after the last element of the loop is removed, but this is not the case. Space between loop elements are also removed.

Commits
-------

8d2b888 do not remove space between attributes
This commit is contained in:
Fabien Potencier 2015-08-04 14:17:43 +02:00
commit 0064d9ebf4
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@
{%- block widget_container_attributes -%}
{% if id is not empty %}id="{{ id }}" {% endif %}
{%- for attrname, attrvalue in attr %}{{ attrname }}="{{ attrvalue }}" {%- endfor -%}
{%- for attrname, attrvalue in attr %}{{ attrname }}="{{ attrvalue }}" {% endfor -%}
{%- endblock widget_container_attributes -%}
{%- block button_attributes -%}