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
-------

82acc89840 [Twig] Remove spaces to fix whitespace in tags
This commit is contained in:
Nicolas Grekas 2018-12-24 11:02:30 +01:00
commit 8943f20770
3 changed files with 3 additions and 6 deletions

View File

@ -178,8 +178,7 @@
{% block form_help -%}
{%- if help is not empty -%}
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-block')|trim}) -%}
<span id="{{ id }}_help" {% for attrname, attrvalue in help_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
<span id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
{%- if translation_domain is same as(false) -%}
{{- help -}}
{%- else -%}

View File

@ -303,8 +303,7 @@
{% block form_help -%}
{%- if help is not empty -%}
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' form-text text-muted')|trim}) -%}
<small id="{{ id }}_help" {% for attrname, attrvalue in help_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
<small id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
{%- if translation_domain is same as(false) -%}
{{- help -}}
{%- else -%}

View File

@ -292,8 +292,7 @@
{% block form_help -%}
{%- if help is not empty -%}
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-text')|trim}) -%}
<p id="{{ id }}_help" {% for attrname, attrvalue in help_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
<p id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
{%- if translation_domain is same as(false) -%}
{{- help -}}
{%- else -%}