<%= render :partial => "stories/listdetail", :locals => { :story => @story, :single_story => true } %>
<% if @story.markeddown_description.present? %>
<%= raw @story.markeddown_description %>
<% end %> <% if @story.is_unavailable && @story.story_cache.present? %> Source URL considered unavailable as of <%= time_ago_in_words_label(@story.unavailable_at) %>, cached text available

All story content copyright of its respective owner.

<%= simple_format(@story.story_cache) %>
<% end %>
<% if !@story.previewing %>
    <% if !@story.is_gone? && !@story.previewing %>
  1. <%= render "comments/commentbox", :comment => @comment %>
  2. <% end %> <% comments_by_parent = @comments.group_by(&:parent_comment_id) %> <% subtree = comments_by_parent[nil] %> <% ancestors = [] %> <% dragons = false %> <% while subtree %> <% if (comment = subtree.shift) %> <% if comment.is_dragon? && !dragons %>
    "> <% dragons = true %> <% end %>
  3. <%= render "comments/comment", :comment => comment, :show_story => (comment.story_id != @story.id), :was_merged => (comment.story_id != @story.id) %> <% if (children = comments_by_parent[comment.id]) %> <% ancestors << subtree %> <% subtree = children %>
      <% else %>
        <% end %> <% elsif (subtree = ancestors.pop) %>
    1. <% end %> <% end %> <% if dragons %>
      <% end %>
    <% end %>