Skip to content

Commit fea4b7c

Browse files
authored
Fix "comma and and" before last author in publication list (#3107)
1 parent f68e88c commit fea4b7c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_layouts/bib.liquid

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@
7474
{% if coauthor.firstname contains author.first %}
7575
{%- assign coauthor_url = coauthor.url -%}
7676
{% break %}
77-
{% endif %}
77+
{%- endif -%}
7878
{% endfor %}
7979
{%- endif -%}
8080

8181
{%- if forloop.length > 1 -%}
82-
{% if forloop.first == false %}, {% endif %}
83-
{%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%}
82+
{% if forloop.first == false -%}
83+
{%- if forloop.length > 2 %}, {% elsif forloop.length == 2 %} {% endif %}
84+
{%- endif %}
85+
{%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%}
8486
{% endif %}
8587
{%- if author_is_self -%}
8688
<em>

0 commit comments

Comments
 (0)