<commit_before><div>
  <% if posts.empty? %>
    <p>Nobody here but us chickens!</p>
  <% else %>
    <ul id="post-list-posts">
    <% posts.each do |post| -%>
      <%-%><%= print_preview(post, :similarity=>(@similar[:similarity][post] rescue nil), :blacklisting => true, :disable_jpeg_direct_links => (not @similar.nil?)) -%>
    <%- end -%>
    </ul>

    <%# Make sure this is done early, as lots of other scripts depend on this registration. %>
    <% content_for_prefix("post_cookie_javascripts") do %>
    <script type="text/javascript">
      <% if @posts %>
        Post.post_tags = <%= Tag.batch_get_tag_types(@posts).to_json %>;
      <% end %>
      <% posts.each do |post| %>
        Post.register(<%= post.to_json %>)
      <% end %>
    </script>
    <% end %>
  <% end %>

<% content_for("post_cookie_javascripts") do %>
<script type="text/javascript">
  <% if @search_id %>
    Post.init_blacklisted({exclude: "<%= h(@search_id) %>"})
  <% else %>
    Post.init_blacklisted()
  <% end %>

  Post.init_post_list();
</script>
<% end %>
</div><commit_msg>cleanup Post.init_blacklisted call<commit_after><div>
  <% if posts.empty? %>
    <p>Nobody here but us chickens!</p>
  <% else %>
    <ul id="post-list-posts">
    <% posts.each do |post| -%>
      <%-%><%= print_preview(post, :similarity=>(@similar[:similarity][post] rescue nil), :blacklisting => true, :disable_jpeg_direct_links => (not @similar.nil?)) -%>
    <%- end -%>
    </ul>

    <%# Make sure this is done early, as lots of other scripts depend on this registration. %>
    <% content_for_prefix("post_cookie_javascripts") do %>
    <script type="text/javascript">
      <% if @posts %>
        Post.post_tags = <%= Tag.batch_get_tag_types(@posts).to_json %>;
      <% end %>
      <% posts.each do |post| %>
        Post.register(<%= post.to_json %>)
      <% end %>
    </script>
    <% end %>
  <% end %>

<% content_for("post_cookie_javascripts") do %>
<script type="text/javascript">
  var blacklist_options = {};
  <% if @search_id %>
    blacklist_options.exclude = <%= @search_id.to_json %>;
  <% end %>
  Post.init_blacklisted(blacklist_options)

  Post.init_post_list();
</script>
<% end %>
</div>
{'fraction_non_alphanumeric': 0.19597989949748743, 'fraction_numerical': 0.0, 'mean_word_length': 3.2690058479532165, 'pattern_counts': {'":': 0, '<': 66, '<?xml version=': 0, '>': 72, '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': '337017', 'n_tokens_mistral': 835, 'n_tokens_neox': 734, 'n_words': 148}