<commit_before><h2>Config</h2>

<%= form_tag(admin_configurable_path, :method => :put) do -%>
  <%- @keys.each do |key| -%>
    <%- options = Configurable.defaults[key] -%>
    <div class="configurable">
      <%= label_tag key, options[:name] %>
      <%- if options[:type] == 'boolean' %>
        <%= hidden_field_tag key, "0" %>
        <%= check_box_tag key, "1", Configurable.send(key) %>
      <%- elsif options[:type] == 'password' -%>
        <%= password_field_tag key, Configurable.send(key) %>
      <%- elsif options[:type] == 'text' -%>
        <%= text_area_tag key, Configurable.send(key) %>
      <%- elsif options[:type] == 'list' -%>
        <%= text_area_tag key, Configurable.serialized_value(key) %>
      <%- else -%>
        <%= text_field_tag key, Configurable.send(key) %>
      <%- end -%>
    </div>
  <%- end -%>
  
  <%= submit_tag 'Save' %>
<%- end -%><commit_msg>trim whitespace on text area in admin view<commit_after><h2>Config</h2>

<%= form_tag(admin_configurable_path, :method => :put) do -%>
  <%- @keys.each do |key| -%>
    <%- options = Configurable.defaults[key] -%>
    <div class="configurable">
      <%= label_tag key, options[:name] %>
      <%- if options[:type] == 'boolean' %>
        <%= hidden_field_tag key, "0" %>
        <%= check_box_tag key, "1", Configurable.send(key) %>
      <%- elsif options[:type] == 'password' -%>
        <%= password_field_tag key, Configurable.send(key) %>
      <%- elsif options[:type] == 'text' -%>
        <%= text_area_tag key, Configurable.send(key) %>
      <%- elsif options[:type] == 'list' -%>
        <%= text_area_tag key, Configurable.serialized_value(key) -%>
      <%- else -%>
        <%= text_field_tag key, Configurable.send(key) %>
      <%- end -%>
    </div>
  <%- end -%>
  
  <%= submit_tag 'Save' %>
<%- end -%>
{'fraction_non_alphanumeric': 0.21617161716171618, 'fraction_numerical': 0.0044004400440044, 'mean_word_length': 2.7660455486542443, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 51, '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': '3095719', 'n_tokens_mistral': 715, 'n_tokens_neox': 665, 'n_words': 113}