diff --git a/src/ec/packages/ec-component-link/link.html.twig b/src/ec/packages/ec-component-link/link.html.twig index 19e164eb6..50fa8b3e7 100644 --- a/src/ec/packages/ec-component-link/link.html.twig +++ b/src/ec/packages/ec-component-link/link.html.twig @@ -68,19 +68,19 @@ {# Print the result #} - {%- if _icon.name is not empty -%} - {%- if _link.icon_position == 'before' -%} - {%- include '../ec-component-icon/icon.html.twig' with icon|merge({extra_classes: 'ecl-link__icon'}) -%} - {{- ' ' -}} + {%- if _icon.name is not empty %} + {% if _link.icon_position == 'before' %} + {% include '../ec-component-icon/icon.html.twig' with icon|merge({extra_classes: 'ecl-link__icon'}) %} + {{- ' ' }} {%- endif -%} {{ _link.label }} - {%- if _link.icon_position == 'after' -%} - {{- ' ' -}} - {%- include '../ec-component-icon/icon.html.twig' with icon|merge({extra_classes: 'ecl-link__icon'}) -%} - {%- endif -%} - {%- else -%} - {{- _link.label -}} - {%- endif -%} + {%- if _link.icon_position == 'after' %} + {{- ' ' }} + {%- include '../ec-component-icon/icon.html.twig' with icon|merge({extra_classes: 'ecl-link__icon'}) %} + {% endif %} + {% else %} + {{- _link.label }} + {%- endif %} {% endspaceless %}