Skip to content

Commit 15c012b

Browse files
committed
Fix bibliography month persistence bug
The month from one entry was incorrectly persisting to subsequent entries that didn't have a month defined. This fix initializes entrymonth and entryyear variables to empty strings before checking if they exist in the entry data. Fixes alshedivat/al-folio#3386
1 parent 56def84 commit 15c012b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

_layouts/bib.liquid

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,11 @@
168168
{% else %}
169169
{% capture entrytype %}{% endcapture %}
170170
{% endif %}
171+
{% assign entrymonth = '' %}
171172
{% if entry.month %}
172173
{% capture entrymonth %}{{ " " }}{{ entry.month | capitalize }}{% endcapture %}
173174
{% endif %}
175+
{% assign entryyear = '' %}
174176
{% if entry.year %}
175177
{% capture entryyear %}{{ " " }}{{ entry.year }}{% endcapture %}
176178
{% endif %}

0 commit comments

Comments
 (0)