<% if @chapters.size > 1 %>
<% for chapter in @chapters %>
<%= render "downloads/download_chapter", chapter: chapter %>
<% end %>
<%# Use elsif so we don't error when there are no chapters. %>
<% elsif @chapters.size == 1 %>
<%= @work.title %>
<%= raw sanitize_field(@chapters.first, :content) %>
<% end %>
<%= render "downloads/download_afterword" %>