Skip to content

Commit

Permalink
Update show.html.erb (publiclab#1013)
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored Nov 23, 2016
1 parent 451b278 commit 0131d58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/tag/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
</div>
<div class="col-md-8">
<h2><%= link_to @wiki.latest.title, "/wiki/#{params[:id]}" %></h2>
<%= (@wiki.latest.render_body.split('</p>').first + '</p>').html_safe %>
<%= (@wiki.latest.render_body.match(/<p>(.+)<\/p>/).first + '</p>').html_safe %>
<%= link_to("Read More", "/wiki/#{params[:id]}") if @wiki.latest.render_body.split('</p>').length > 2 %>
</div>
</div>
<% else %>
<h2><%= @wiki.latest.title %></h2>
<%= @wiki.latest.render_body.split('\n').first.html_safe %>
<%= link_to("Read More", "/wiki/#{params[:id]}") if @wiki.latest.render_body.split('\n').length > 1 %>
<p><%= @wiki.latest.render_body.split('\n').first.html_safe %></p>
<p><%= link_to("Read More &raquo;", "/wiki/#{params[:id]}") if @wiki.latest.render_body.split('\n').length > 1 %></p>
<% end %>
</div>
<% end %>
Expand Down

0 comments on commit 0131d58

Please sign in to comment.