My twig file is adding line breaks in the HTML which results in white spaces, as shown in this picture:
When I remove the line breaks in the inspector, the white spaces disappear.
The default code in the file views-view-field.html.twig is:
{{ output -}}
I have researched the problem quite a bit and tried the following already, without success:
{{ output|replace({"\n":''}) }}
{{ output|trim }}
{% spaceless %}{{ output }}{% endspaceless %}
{% spaceless %}{{ output|render|trim }}{% endspaceless %}
I'm working on Drupal 8.7.6.
Any help would be appreciated.