Skip to content

Commit

Permalink
Fix the delimiter error of post categories
Browse files Browse the repository at this point in the history
一篇文章有多个分类时,最后一个分类后面多一个逗号。问题由变量名称错误导致,应该将 loop 改为 forloop。
  • Loading branch information
izhizheng committed Feb 4, 2018
1 parent 76ed2ca commit 768282d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/_macro/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</span>

{% assign cat_length = post.categories.size %}
{% if cat_length > 1 and loop.index != cat_length %}
{% if cat_length > 1 and forloop.index != cat_length %}
{{ __.symbol.comma }}
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 768282d

Please sign in to comment.