<% annotations.each_with_index do |annotation, index| %>
<% if annotation[:annomark_ids].present? %> <% annomarks = Annomark.where(id: annotation[:annomark_ids]) %> <%= "#{annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")}" %> <% end %>
<% contents = annotation[:content].gsub("
", "").gsub("
", "").split(" citing ") %> <% phil_rep = annotation[:phil_rep] %> <% contents[0] = [contents[0], phil_rep.gsub(/(PhilRep|Phil)\.?,?/i, "Phil")].join(" ") %> <%= raw contents.length > 1 ? contents.join(" citing ") : contents[0] %>
Edit Delete
<% if annotation[:editor_notes].present? %>
Editor's Note:
<%= raw annotation[:editor_notes] %>

<% end %> <% end %>