From 4a39b82795394152e0f06bfe44f013d86c8f37d6 Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Sat, 9 Apr 2016 15:20:13 -0700 Subject: [PATCH 1/2] Fixed bug with include when using.size == 1 If using.size is 1, then the resulting html would be "and PROJECT use the ..." without anything being listed before the "and". --- _includes/using-sentence.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/using-sentence.html b/_includes/using-sentence.html index 94bea5f..79cf7f1 100644 --- a/_includes/using-sentence.html +++ b/_includes/using-sentence.html @@ -5,7 +5,7 @@ {% if using.size > 0 %} {% for used in using limit: 3 %} {% assign last = forloop.last %} - {% if last %} + {% if last and using.size > 1 %} and {% endif %} {% for hash in used %} From ff122da7962e08a3c7c151bc16fcba5a11bcde1d Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Sat, 9 Apr 2016 15:24:15 -0700 Subject: [PATCH 2/2] Add 's' when only a single license When `using.size` == 1, add an 's' to the using sentence. --- _includes/using-sentence.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/using-sentence.html b/_includes/using-sentence.html index 79cf7f1..4ed2309 100644 --- a/_includes/using-sentence.html +++ b/_includes/using-sentence.html @@ -12,6 +12,6 @@ {{ hash[0] }}{% if last == false %},{% endif %} {% endfor %} {% endfor %} - use the {% if license.nickname %}{{ license.nickname }}{% else %}{{ license.title }}{% endif %}. + use{% if using.size == 1 %}s{% endif %} the {% if license.nickname %}{{ license.nickname }}{% else %}{{ license.title }}{% endif %}. {% endif %} {% endfor %}