8000 minor #29636 [Twig] Remove spaces to fix whitespace in tags (royklutman) · symfony/symfony@8943f20 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8943f20

Browse files
minor #29636 [Twig] Remove spaces to fix whitespace in tags (royklutman)
This PR was squashed before being merged into the 4.2 branch (closes #29636). Discussion ---------- [Twig] Remove spaces to fix whitespace in tags | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | License | MIT `form_help` tags in forms have double spaces between its `id` als `class` attributes. Fixed this by removing unnecessary spaces. This issue was introduced in `4.2`. Commits ------- 82acc89 [Twig] Remove spaces to fix whitespace in tags
2 parents 5ee0c04 + 82acc89 commit 8943f20

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@
178178
{% block form_help -%}
179179
{%- if help is not empty -%}
180180
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-block')|trim}) -%}
181-
182-
<span id="{{ id }}_help" {% for attrname, attrvalue in help_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
181+
<span id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
183182
{%- if translation_domain is same as(false) -%}
184183
{{- help -}}
185184
{%- else -%}

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,7 @@
303303
{% block form_help -%}
304304
{%- if help is not empty -%}
305305
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' form-text text-muted')|trim}) -%}
306-
307-
<small id="{{ id }}_help" {% for attrname, attrvalue in help_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
306+
<small id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
308307
{%- if translation_domain is same as(false) -%}
309308
{{- help -}}
310309
{%- else -%}

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,7 @@
292292
{% block form_help -%}
293293
{%- if help is not empty -%}
294294
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-text')|trim}) -%}
295-
296-
<p id="{{ id }}_help" {% for attrname, attrvalue in help_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
295+
<p id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
297296
{%- if translation_domain is same as(false) -%}
298297
{{- help -}}
299298
{%- else -%}

0 commit comments

Comments
 (0)
0