Add pretty natural language, oxford commad, 'and's

This commit is contained in:
benjamin melançon 2018-11-01 04:41:58 -04:00
parent a0d31318e4
commit e6cbc3482f

View file

@ -58,7 +58,8 @@
<p{{ attributes.removeClass('content') }}>
<label{{ title_attributes.removeClass('label') }}>{{ label }}</label>
{% for item in items %}
<strong>{{ item.content }}</strong>{% if not loop.last %}, {% endif %}
{% if loop.length > 1 and loop.index == loop.length %}and {% endif %}
<strong>{{ item.content }}</strong>{% if loop.length > 2 and not loop.last %}, {% endif %}
{% endfor %}
</p>
{% else %}