Skip to content

Commit b7b4dfa

Browse files
committed
fix: remove extra whitespace in recently shipping
1 parent 657ba99 commit b7b4dfa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

app/views/pages/home.html.erb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020

2121
<% if @recently_active_repos.any? %>
2222
<p class="intro-tagline mt-2">
23-
Recently shipping
24-
<% @recently_active_repos.each_with_index do |repo, index| -%>
25-
<% if index == @recently_active_repos.size - 1 && @recently_active_repos.size > 1 %> and <% elsif index > 0 %>, <% end -%>
26-
<strong><%= link_to repo.name, repo.html_url, target: "_blank", rel: "noopener" %></strong>
27-
<%- end %>
28-
(latest: <%= @recently_active_repos.first.detailed_time_ago %>).
23+
Recently shipping <%= @recently_active_repos.each_with_index.map { |repo, i|
24+
separator = i == 0 ? "" : (i == @recently_active_repos.size - 1 ? " and " : ", ")
25+
"#{separator}<strong>#{link_to repo.name, repo.html_url, target: "_blank", rel: "noopener"}</strong>"
26+
}.join.html_safe %> (latest: <%= @recently_active_repos.first.detailed_time_ago %>).
2927
</p>
3028
<% end %>
3129
</div>

0 commit comments

Comments
 (0)