<commit_before><div class="row">
  <div class="large-12 columns">

    <div class="snippet">
      <div class="snippet-content">
         <%= strip_tags(@story.snippet.content) %>
      </div>
      <div class="snippet-author">
        <% if @story.snippet.user %>
          - <%= link_to @story.snippet.user.username, user_path(@story.snippet.user)  %> (<%= link_to "link", @story.snippet %>)
        <% end %>
      </div>
    </div>

  <div class="story-show">
    <% if @story.title && @story.content %>
      <h4><%= @story.title.html_safe %></h4>
      <%= @story.content.html_safe %><br>
      Written By: <%= link_to "#{@story.author.username}", user_path(@story.author.id) %><br></br>
      <%= link_to "Write Off Of This Story", new_nested_story_path %>
    <% end %>
  </div>

  <div class="story-show">
    <h3>Children:</h3>
    <% @story.children.each do |story| %>
      <% if story.published == true %>
        <%= link_to "#{story.title}", story_path(story.id) %>
        By: <%= story.author.username %><br>
      <% end %>
    <% end %>
  </div>

  <div class="votes">
    <div class="vote-count">
      Votes: <%= @story.vote_count %>
    </div>
    <div class="vote-button">
      <% if current_user %>
        <div id="upvote">
        <% if @vote != nil && @vote.user_id == current_user.id %>
          <%= button_to "Downvote",vote_delete_path(@vote), :method => :delete, :class => "button round", :confirm => "Are you sure ?" %>
        <% else %>
          <%= render "votes/new" %>
        <% end %>
        </div>
      <% end %>
    </div>
  </div>

<% if story_editable?(@story) %>
<div>
  <% if !@story.published && story_editable?(@story) %><Br><br>
    <%= link_to "Edit", edit_story_path(@story) %><br>
    <%= link_to "Delete", @story, :method => :delete %>
  <% end %>

</div>
<br><br>

<% if current_user %>
  <%= form_for @story, :url => story_flag_path(@story) do |f| %>
  <%= f.submit "Report inappropriate" %>
  <% end %>
<% end %>

<div class="story-tags">
  <% @story.tags.each do |tag| %>
    <%= link_to "#{tag.name}", tags_show_path(tag) %><br>
  <% end %>
  <%= render :partial => 'tags/tagform'%>
</div>
<% end %>
<br><br>

<div class="story-badges">
  <%# @story.badges.each do |badge| %>
    <%# badge.title  %>
  <%# end %>
  <% if @story.author != nil %>
    <%= @story.award_badge %>
    <%# @story.most_voted %>
  <% end %>
</div>
</div>
</div>
<commit_msg>add section to show parent story<commit_after><div class="row">
  <div class="large-12 columns">

    <div class="snippet">
      <div class="snippet-content">
         <%= strip_tags(@snippet.content) %>
      </div>
      <div class="snippet-author">
        <% if @story.snippet.user %>
          - <%= link_to @story.snippet.user.username, user_path(@story.snippet.user)  %> (<%= link_to "link", @story.snippet %>)
        <% end %>
      </div>
    </div>

  <div class="story-show">
    <% if @story.title && @story.content %>
      <h4><%= @story.title.html_safe %></h4>
      <%= @story.content.html_safe %><br>
      Written By: <%= link_to "#{@story.author.username}", user_path(@story.author.id) %><br></br>
      <% if @story.published %>
        <%= link_to "Write Off Of This Story", new_nested_story_path %>
      <% end %>
    <% end %>
  </div>


    <% if @story.parent != nil %>
  <div class="story-show">
    <h3>Parent Story:</h3>
        <%= link_to "#{@story.parent.title}", story_path(@story.parent.id) %><br>
  </div>
    <% end %>


  <div class="story-show">
    <h3>Children:</h3>
    <% @story.children.each do |story| %>
      <% if story.published == true %>
        <%= link_to "#{story.title}", story_path(story.id) %>
        By: <%= story.author.username %><br>
      <% end %>
    <% end %>
  </div>

  <div class="votes">
    <div class="vote-count">
      Votes: <%= @story.vote_count %>
    </div>
    <div class="vote-button">
      <% if current_user %>
        <div id="upvote">
        <% if @vote != nil && @vote.user_id == current_user.id %>
          <%= button_to "Downvote",vote_delete_path(@vote), :method => :delete, :class => "button round", :confirm => "Are you sure ?" %>
        <% else %>
          <%= render "votes/new" %>
        <% end %>
        </div>
      <% end %>
    </div>
  </div>

<% if story_editable?(@story) %>
<div>
  <% if !@story.published && story_editable?(@story) %><Br><br>
    <%= link_to "Edit", edit_story_path(@story) %><br>
    <%= link_to "Delete", @story, :method => :delete %>
  <% end %>

</div>
<br><br>

<% if current_user %>
  <%= form_for @story, :url => story_flag_path(@story) do |f| %>
  <%= f.submit "Report inappropriate" %>
  <% end %>
<% end %>

<div class="story-tags">
  <% @story.tags.each do |tag| %>
    <%= link_to "#{tag.name}", tags_show_path(tag) %><br>
  <% end %>
  <%= render :partial => 'tags/tagform'%>
</div>
<% end %>
<br><br>

<div class="story-badges">
  <%# @story.badges.each do |badge| %>
    <%# badge.title  %>
  <%# end %>
  <% if @story.author != nil %>
    <%= @story.award_badge %>
    <%# @story.most_voted %>
  <% end %>
</div>
</div>
</div>

{'fraction_non_alphanumeric': 0.23164731352096044, 'fraction_numerical': 0.0027553631174965557, 'mean_word_length': 2.712198685171658, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 207, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3286428', 'n_tokens_mistral': 2047, 'n_tokens_neox': 1840, 'n_words': 357}