<commit_before><% @page_title = search_posts_title -%>

<h1>
<% if params[:q].blank? -%>
  <%= @page_title %>
<% else -%>
  <%= 'Searching for'[] %> '<%= h params[:q] %>'
<% end -%>
</h1>
<p class="subtitle">
  <%= feed_icon_tag @page_title, search_posts_path(true) %>
  <%= '{count} post(s) found'[(count=@posts.total_entries)==1 ? :post_count_found : :posts_count_found, number_with_delimiter(count)] %>
</p>

<%= will_paginate @posts %>

<table border="0" cellspacing="0" cellpadding="0" class="posts wide">
<% for post in @posts do %>
<% unless post == @posts.first %>
<tr class="spacer">
  <td colspan="2">&nbsp;</td>
</tr>
<% end %>
<tr class="post hentry" id="<%= dom_id post %>">
  <td class="author vcard">
    <div class="date">
      <abbr class="updated" title="<%= post.created_at.xmlschema %>">
      <% if post.created_at > Time.now.utc-24.hours%>
      <%= time_ago_in_words(post.created_at).sub(/about /, '') %>
      <% else %>
      <%= post.created_at.strftime("%b %e, %Y"[:date_format])%>
      <% end %>
      </abbr>
    </div>

    <%= avatar_for @users[post.user_id] %>
    <span class="fn"><%= link_to truncate(h(@users[post.user_id].display_name), 15), person_path(@users[post.user_id].person) %></span>
    <span class="posts"><%= '{count} posts'[(count=@users[post.user_id].posts.size)==1 ? :post_count : :posts_count, number_with_delimiter(count)] %></span>
  </td>
  <td class="body entry-content">
    <p class="topic">
      <%= "Topic"[:topic_title] %>: <%= link_to h(post.forum_name), forum_path(post.forum_id) %> / 
      <%= link_to h(post.topic_title), forum_topic_path(post.forum_id, post.topic_id) %>
    </p><commit_msg>fix using truncate in posts index<commit_after><% @page_title = search_posts_title -%>

<h1>
<% if params[:q].blank? -%>
  <%= @page_title %>
<% else -%>
  <%= 'Searching for'[] %> '<%= h params[:q] %>'
<% end -%>
</h1>
<p class="subtitle">
  <%= feed_icon_tag @page_title, search_posts_path(true) %>
  <%= '{count} post(s) found'[(count=@posts.total_entries)==1 ? :post_count_found : :posts_count_found, number_with_delimiter(count)] %>
</p>

<%= will_paginate @posts %>

<table border="0" cellspacing="0" cellpadding="0" class="posts wide">
<% for post in @posts do %>
<% unless post == @posts.first %>
<tr class="spacer">
  <td colspan="2">&nbsp;</td>
</tr>
<% end %>
<tr class="post hentry" id="<%= dom_id post %>">
  <td class="author vcard">
    <div class="date">
      <abbr class="updated" title="<%= post.created_at.xmlschema %>">
      <% if post.created_at > Time.now.utc-24.hours%>
      <%= time_ago_in_words(post.created_at).sub(/about /, '') %>
      <% else %>
      <%= post.created_at.strftime("%b %e, %Y"[:date_format])%>
      <% end %>
      </abbr>
    </div>

    <%= avatar_for @users[post.user_id] %>
    <span class="fn"><%= link_to truncate(h(@users[post.user_id].display_name), :lengh => 15), person_path(@users[post.user_id].person) %></span>
    <span class="posts"><%= '{count} posts'[(count=@users[post.user_id].posts.size)==1 ? :post_count : :posts_count, number_with_delimiter(count)] %></span>
  </td>
  <td class="body entry-content">
    <p class="topic">
      <%= "Topic"[:topic_title] %>: <%= link_to h(post.forum_name), forum_path(post.forum_id) %> / 
      <%= link_to h(post.topic_title), forum_topic_path(post.forum_id, post.topic_id) %>
    </p>
{'fraction_non_alphanumeric': 0.2318019093078759, 'fraction_numerical': 0.007159904534606206, 'mean_word_length': 4.408064516129032, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 104, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1856632', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1272, 'n_words': 217}