<commit_before><% if profiles.load.any? %>

  <% if profiles.size > 1 || result_from_filter? %>
    <%= t(:filter, scope: 'search') %>
    <div class="row">
      <% filters_hash(aggs_countries, aggs_cities, aggs_languages).each do |filter| %>
        <div class="col-sm-12 col-md-4">
          <ul id="facet_<%= filter[:key] %>" class="search-aggregation list-unstyled">
            <b><%= t(filter[:title], scope: 'search' ).html_safe %></b>
            <li class="pl-1 <%= 'selected' if !filter[:param_val] %>">
              <%= link_to(
                    t(filter[:all_text], scope: 'search'),
                    filter[:filter_params_all],
                    class: "#{'bg-dark text-light' if !filter[:param_val] }")
              %>
            </li>
            <% filter[:aggregations][0..9].each do |term| %>
              <li class="pl-1 <%= 'selected' if filter[:param_val] == term['key'] %>">
                <%= link_to(
                      filter[:link_text_func].call(term['key']),
                      filter[:filter_params_func].call(term['key']),
                      class: "#{'bg-dark text-light' if filter[:param_val] == term['key'] }")
                %>
                <small class="pl-1"><%= term['doc_count'] %></small>
              </li>
            <% end %>
            <% if filter[:aggregations].length > 10 %>
              <li>
                <a class="pl-1 expander_<%= filter[:key] %>"><%= t(:show_more, scope: 'profiles.index') %></a>
              </li>
              <% display_value = filter[:aggregations][10..999] == [] ? "block" : "none" %>
              <% filter[:aggregations][10..999].each do |term| %>
                <li class="pl-1 <%= 'selected' if filter[:param_val] == term['key'] %>">
                  <%= link_to(
                        filter[:link_text_func].call(term['key']),
                        { search: params[:search], filter_countries: term['key'], filter_cities: params[:filter_cities], filter_lang: params[:filter_lang] },
                        class: "#{'bg-dark text-light' if filter[:param_val] == term['key'] }")
                  %>
                  <small class="pl-1"><%= term['doc_count'] %></small>
                </li>
              <% end %>
            <% end %>
          </ul>
        </div>
      <% end %>
    </div><commit_msg>Fix filters expander which stopped being hidden<commit_after><% if profiles.load.any? %>

  <% if profiles.size > 1 || result_from_filter? %>
    <%= t(:filter, scope: 'search') %>
    <div class="row">
      <% filters_hash(aggs_countries, aggs_cities, aggs_languages).each do |filter| %>
        <div class="col-sm-12 col-md-4">
          <ul id="facet_<%= filter[:key] %>" class="search-aggregation list-unstyled">
            <b><%= t(filter[:title], scope: 'search' ).html_safe %></b>
            <li class="pl-1 <%= 'selected' if !filter[:param_val] %>">
              <%= link_to(
                    t(filter[:all_text], scope: 'search'),
                    filter[:filter_params_all],
                    class: "#{'bg-dark text-light' if !filter[:param_val] }")
              %>
            </li>
            <% filter[:aggregations][0..9].each do |term| %>
              <li class="pl-1 <%= 'selected' if filter[:param_val] == term['key'] %>">
                <%= link_to(
                      filter[:link_text_func].call(term['key']),
                      filter[:filter_params_func].call(term['key']),
                      class: "#{'bg-dark text-light' if filter[:param_val] == term['key'] }")
                %>
                <small class="pl-1"><%= term['doc_count'] %></small>
              </li>
            <% end %>
            <% if filter[:aggregations].length > 10 %>
              <li>
                <a class="pl-1 expander_<%= filter[:key] %>"><%= t(:show_more, scope: 'profiles.index') %></a>
              </li>
              <div class="rest_facet_<%= filter[:key] %>" style="display: none">
                <% filter[:aggregations][10..999].each do |term| %>
                  <li class="pl-1 <%= 'selected' if filter[:param_val] == term['key'] %>">
                    <%= link_to(
                          filter[:link_text_func].call(term['key']),
                          { search: params[:search], filter_countries: term['key'], filter_cities: params[:filter_cities], filter_lang: params[:filter_lang] },
                          class: "#{'bg-dark text-light' if filter[:param_val] == term['key'] }")
                    %>
                    <small class="pl-1"><%= term['doc_count'] %></small>
                  </li>
                <% end %>
              </div>
            <% end %>
          </ul>
        </div>
      <% end %>
    </div>
{'fraction_non_alphanumeric': 0.1951735817104149, 'fraction_numerical': 0.009102455546147333, 'mean_word_length': 1.7375434530706837, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 101, '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': '1990484', 'n_tokens_mistral': 1521, 'n_tokens_neox': 1376, 'n_words': 255}