Wrong formatting between State, City

Created on 20 January 2024, 11 months ago

The formatter for "Country, State, City" has a bug that makes the comma appear after a whitespace instead of before it, like this:

United States, Ohio ,Akron

Correct output should be:

United States, Ohio, Akron

It could be helped with:

<div class="country-state-country" translate="no">
  {% if country %}
    {{ country }},
  {% endif %}

  {% if state %}
    {{ state }}
  {%- endif -%}

  {% if city -%}
   , {{ city }}
  {% endif %}
</div>

in country-state-city.html.twig

I'll see if I can do a MR on GitLab.

BTW why add the HTML comment in the template? That ends up in the final HTML output.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇭🇷Croatia portulaca

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024