I am trying to print a line of text to a file such that field1 is separated from field2 by 16 characters. I have a template like this working:
{% for item in collection %}
{{ item.name }}{{ " " |truncate(16-(item.name|length)) }}{{ name.value }}
{% endfor %}
So the " " field is 16 spaces, and the longest item.name is 15 chars, so that line should have only one space between it and its item.value, while other lines will have their item.value’s lined up in the same column. This is mostly working, but this is my exact output:
item1 …v01
item02 …v2
the_15-chr_item …v03
item0004 …v04
Where are all the '…'s coming from? When I changed the ‘truncate’ line to ‘truncate(13-(item.name|length)’, I got this:
item1 …v01
item02 …v2
the_15-chr_item…v03
item0004 …v04
Technically correct, but again still with ‘…’. What am I doing wrong?