<commit_before><a class="post-anchor" name="post-<%= post.id %>"></a>
<div id="post-<%= post.id %>" class="post <%= cycle('odd', 'even') -%>">
  <div class="user">
    <% if post.author %>
      <h5 class="username">
        <%= link_to post.author.user, course_user_course_path(@course, post.author) %>
      </h5>
      <div class="icon pull-right">
        <img class="user-profile-pic" src="<%= post.author.user.get_profile_photo_url %>"/>
      </div>
    <% else %>
      <h5 class="username">(unknown)</h5>
    <% end %>

    <div class="voting pull-right">
      <% if post.topic.question? and can? :set_answer, @topic %>
        <% if post.answer? %>
          <%= link_to course_forum_topic_post_answer_path(@course, @forum, @topic, post, answer: 0), method: :put, title: 'Unmark as Answer' do %>
            <i class="icon-ok"></i>
          <% end %>
        <% else %>
          <%= link_to course_forum_topic_post_answer_path(@course, @forum, @topic, post, answer: 1), method: :put, title: 'Mark as Answer' do %>
            <i class="icon-ok"></i>
          <% end %>
        <% end %>
      <% end %>
      <% votes = post.upvotes.size - post.downvotes.size %>
      <% if not current_user.voted_for? post %>
        <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: -1), method: :put, title: 'Downvote' do %>
          <i class="icon-thumbs-down"></i>
        <% end %>
        <span class="muted"><%= votes %></span>
        <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: 1), method: :put, title: 'Upvote' do %>
          <i class="icon-thumbs-up"></i>
        <% end %>
      <% else %>
        <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: 0), method: :put, title: 'Downvote' do %>
          <i class="icon-thumbs-down"></i>
        <% end %>
        <strong><%= votes %></strong>
        <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: 0), method: :put, title: 'Upvote' do %>
          <i class="icon-thumbs-up"></i>
        <% end %>
      <% end %>
    </div>
  </div>

  <div class="contents <%= post.answer? ? 'answer' : '' -%>">
    <%= CoursemologyFormatter.sanitize(post.text).html_safe %>

    <div class="info">
      <a href="#post-<%= post.id %>">
        <time datetime="<%= post.created_at.to_s(:db) -%>">
          Posted <%= time_ago_in_words(post.created_at) %> ago
          <% if post.unread?(curr_user_course)  %>
            <span class="label">New!</span>
          <% end %>
        </time>
      </a>

      <div class="pull-right">
        <% if post.topic.can_be_replied_to? %>
          <%= link_to 'Reply', reply_course_forum_topic_post_path(@course, @forum, post.topic, post), class: 'btn reply', 'data-post-id' => post.id, 'data-post-title' => post.title %>
        <% end %>
        <% if can? :edit, post %>
          <%= link_to 'Edit', edit_course_forum_topic_post_path(@course, @forum, post.topic, post), class: 'btn' %>
        <% end %>
        <% if can? :destroy, post %>
          <%= render partial: 'layouts/delete_confirm', locals: { display_label: 'Delete', path_to_item: course_forum_topic_post_path(@course, @forum, post.topic, post) } %>
        <% end %>
      </div>
    </div>
  </div>
</div><commit_msg>link to fb in forum post prof pic<commit_after><a class="post-anchor" name="post-<%= post.id %>"></a>
<div id="post-<%= post.id %>" class="post <%= cycle('odd', 'even') -%>">
  <div class="user">
    <% if post.author %>
        <h5 class="username">
          <%= link_to post.author.user, course_user_course_path(@course, post.author) %>
        </h5>
        <div class="icon pull-right">
          <a href="<%= get_social_media_url(post.author) %>">
            <img class="user-profile-pic" src="<%= post.author.user.get_profile_photo_url %>"/>
          </a>
        </div>
    <% else %>
        <h5 class="username">(unknown)</h5>
    <% end %>

    <div class="voting pull-right">
      <% if post.topic.question? and can? :set_answer, @topic %>
          <% if post.answer? %>
              <%= link_to course_forum_topic_post_answer_path(@course, @forum, @topic, post, answer: 0), method: :put, title: 'Unmark as Answer' do %>
                  <i class="icon-ok"></i>
              <% end %>
          <% else %>
              <%= link_to course_forum_topic_post_answer_path(@course, @forum, @topic, post, answer: 1), method: :put, title: 'Mark as Answer' do %>
                  <i class="icon-ok"></i>
              <% end %>
          <% end %>
      <% end %>
      <% votes = post.upvotes.size - post.downvotes.size %>
      <% if not current_user.voted_for? post %>
          <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: -1), method: :put, title: 'Downvote' do %>
              <i class="icon-thumbs-down"></i>
          <% end %>
          <span class="muted"><%= votes %></span>
          <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: 1), method: :put, title: 'Upvote' do %>
              <i class="icon-thumbs-up"></i>
          <% end %>
      <% else %>
          <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: 0), method: :put, title: 'Downvote' do %>
              <i class="icon-thumbs-down"></i>
          <% end %>
          <strong><%= votes %></strong>
          <%= link_to course_forum_topic_post_vote_path(@course, @forum, @topic, post, vote: 0), method: :put, title: 'Upvote' do %>
              <i class="icon-thumbs-up"></i>
          <% end %>
      <% end %>
    </div>
  </div>

  <div class="contents <%= post.answer? ? 'answer' : '' -%>">
    <%= CoursemologyFormatter.sanitize(post.text).html_safe %>

    <div class="info">
      <a href="#post-<%= post.id %>">
        <time datetime="<%= post.created_at.to_s(:db) -%>">
          Posted <%= time_ago_in_words(post.created_at) %> ago
          <% if post.unread?(curr_user_course)  %>
              <span class="label">New!</span>
          <% end %>
        </time>
      </a>

      <div class="pull-right">
        <% if post.topic.can_be_replied_to? %>
            <%= link_to 'Reply', reply_course_forum_topic_post_path(@course, @forum, post.topic, post), class: 'btn reply', 'data-post-id' => post.id, 'data-post-title' => post.title %>
        <% end %>
        <% if can? :edit, post %>
            <%= link_to 'Edit', edit_course_forum_topic_post_path(@course, @forum, post.topic, post), class: 'btn' %>
        <% end %>
        <% if can? :destroy, post %>
            <%= render partial: 'layouts/delete_confirm', locals: { display_label: 'Delete', path_to_item: course_forum_topic_post_path(@course, @forum, post.topic, post) } %>
        <% end %>
      </div>
    </div>
  </div>
</div>
{'fraction_non_alphanumeric': 0.19615892097932855, 'fraction_numerical': 0.002932121389825539, 'mean_word_length': 2.518308406395049, 'pattern_counts': {'":': 0, '<': 186, '<?xml version=': 0, '>': 190, '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': '4537972', 'n_tokens_mistral': 2507, 'n_tokens_neox': 2273, 'n_words': 478}