<% content_for :breadcrumbs do %>
  <ol class="breadcrumb">
    <li><%= link_to 'Posts', posts_path %></li>
    <li class="active"><%= @post.title %></li>
  </ol>
<% end %>

<div class="post">
  <h1>
    <%= @post.title %>
    <%= render 'votes/vote', post: @post %>
  </h1>

  <p>
    Posted by: <%= @post.username %> on <%= @post.created_at.strftime("%m/%d/%Y") %>
    <% if policy(@post).update? %>
      | <%= link_to 'Edit', edit_post_path(@post) %>
    <% end %>
    <% if policy(@post).destroy? %>
      | <%= link_to 'Destroy', post_path(@post), method: :delete, data: { confirm: 'Are you sure?' } %>
    <% end %>
  </p>

  <div class="body">
    <%= raw @post.body_html %>
    <% if @post.external_post? %>
      <p><%= link_to 'Visit Website', @post.external_url %></p>
    <% end %>
  </div>

  <%= render 'tags', post: @post %>

  <% unless @post.external_post? %>
    <h2>Comments</h2>
    <%= render 'comments/form' %>

    <% @post.comments.each do |comment| %>
      <%= render comment %>
    <% end %>
  <% end %>
</div>

<% content_for :breadcrumbs do %>
  <ol class="breadcrumb">
    <li><%= link_to 'Posts', posts_path %></li>
    <li class="active"><%= @post.title %></li>
  </ol>
<% end %>

<div class="post">
  <h1>
    <%= @post.title %>
    <%= render 'votes/vote', post: @post %>
  </h1>

  <p>
    Posted by: <%= @post.username %> on <%= @post.created_at.strftime("%m/%d/%Y") %>
    <% if policy(@post).update? %>
      | <%= link_to 'Edit', edit_post_path(@post) %>
    <% end %>
    <% if policy(@post).destroy? %>
      | <%= link_to 'Destroy', post_path(@post), method: :delete, data: { confirm: 'Are you sure?' } %>
    <% end %>
  </p>

  <div class="body">
    <%= raw @post.body_html %>
    <% if @post.external_post? %>
      <p><%= link_to 'Visit Website', @post.source_url %></p>
    <% end %>
  </div>

  <%= render 'tags', post: @post %>

  <% unless @post.external_post? %>
    <h2>Comments</h2>
    <%= render 'comments/form' %>

    <% @post.comments.each do |comment| %>
      <%= render comment %>
    <% end %>
  <% end %>
</div>

Fix bug in rendering link to external post
Fix bug in rendering link to external post
