<commit_before><% criterion_result = project.get_criterion_result(criterion)
   status_symbol = (criterion.to_s + '_status').to_sym
   justification_symbol = (criterion.to_s + '_justification').to_sym
   project_criterion_status = project[status_symbol]
   project_criterion_justification = project[justification_symbol] %>

<% cache [criterion.to_s, criteria_level, is_disabled, locale,
          project_criterion_status, project_criterion_justification ] do %>
  <% passing_class = ''
      if criterion_result == :criterion_passing && is_disabled
       passing_class = ' criterion-passing'
     end %>
  <div id="<%= criterion.to_s %>" class="row criterion-data<%= passing_class %>">
    <% is_crypto = criterion.to_s.match(/^crypto_/)
       crypto_class = is_crypto ? ' criterion-is-crypto' : '' %>

    <div class="col-md-2 col-sm-3 col-xs-4 criteria-radio<%= crypto_class %>">
      <div class="status-chooser">
      <%= f.form_group status_symbol do %>
        <%#
                       !!!!!  IMPORTANT  !!!!!
          The functionality below is mirrored in assets/project-form.js
          in the function "resetCriterionResult".  If you change the code
          below, change "resetCriterionResult" accordingly.
                       !!!!!!!!!!!!!!!!!!!!!!!
        %>
        <div class="col-xs-4 text-left block-left"><br>
          <% if criterion_result == :criterion_passing %>
            <%= image_tag(
                  'result_symbol_check.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.passing_alt')
                ) %>
          <% elsif criterion_result == :criterion_barely %>
            <%= image_tag(
                  'result_symbol_dash.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.barely_alt')
                ) %>
          <% elsif criterion_result == :criterion_failing %>
            <%= image_tag(
                  'result_symbol_x.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.failing_alt')
                ) %>
          <% else %>
            <%= image_tag(
                  'result_symbol_question.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.unknown_alt')
                ) %>
          <% end %>
        <%#            !!!!!!!!!!!!!!!!!!!!!!!            %>
        </div>
        <div class="col-xs-4 col-xs-offset-2 col-sm-offset-1 text-left block-left">
          <fieldset>
          <legend class="hidden"><%= "Criterion [#{criterion}]" %></legend>
          <%= f.radio_button status_symbol, 'Met', label: t('criterion_status.Met'),
                                                   disabled: is_disabled %>
          <%= f.radio_button status_symbol, 'Unmet', label: t('criterion_status.Unmet'),
                                                     disabled: is_disabled  %>
          <% if criterion.na_allowed? %>
            <%= f.radio_button status_symbol, 'N/A', label: t('criterion_status.NA'),
                                                     disabled: is_disabled  %>
          <% end %>
          <%= f.radio_button status_symbol, '?', label: '?',
                                                 disabled: is_disabled  %>
          </fieldset>
        </div>
      <% end %>
    </div>
  </div>

  <div class='col-md-10 col-sm-9 col-xs-12 criteria-desc'>
    <br>
    <% if criterion.future? %>(<%= t('projects.misc.future_criterion') %>) <% end %>
    <%= sanitize criterion.description %>
    <% if criterion.met_url_required? %>(<%= t('projects.misc.url_required') %>) <% end %>
    <sup>[<%= criterion %>]</sup>
    <%= if criterion.details
          render(partial: "details",
            locals: {f: f, criterion: criterion,
                     details: criterion.details.html_safe})
        end %>
    <% if (is_disabled) %>
      <% if project_criterion_justification %>
        <% cache ['markdown', project_criterion_justification] do %>
          <div class="justification-markdown">
            <%= markdown(project_criterion_justification) %>
          </div>
        <% end %>
      <% end %>
      <% if criterion_result == :criterion_url_required %>
        <p class="bg-warning"><%= t('projects.misc.url_required_warning') %></p>
      <% elsif criterion_result == :criterion_justification_required %>
        <p class="bg-warning"><%= t('projects.misc.justification_required_warning') %></p>
      <% end %>
    <% else %>
      <%= f.text_area justification_symbol,
                      class: 'justification-text', hide_label: true,
                      lang: 'en', spellcheck: true,
                      placeholder:t('projects.misc.in_javascript.unknown_placeholder'),
                      disabled: is_disabled %>
    <% end %>
    <% if is_last %>
      <br>
    <% else %>
      <hr>
    <% end %>
    </div><commit_msg>Cache markdown based on project id, lock version, and criterion<commit_after><% criterion_result = project.get_criterion_result(criterion)
   status_symbol = (criterion.to_s + '_status').to_sym
   justification_symbol = (criterion.to_s + '_justification').to_sym
   project_criterion_status = project[status_symbol]
   project_criterion_justification = project[justification_symbol] %>

<% cache [criterion.to_s, criteria_level, is_disabled, locale,
          project_criterion_status, project_criterion_justification ] do %>
  <% passing_class = ''
      if criterion_result == :criterion_passing && is_disabled
       passing_class = ' criterion-passing'
     end %>
  <div id="<%= criterion.to_s %>" class="row criterion-data<%= passing_class %>">
    <% is_crypto = criterion.to_s.match(/^crypto_/)
       crypto_class = is_crypto ? ' criterion-is-crypto' : '' %>

    <div class="col-md-2 col-sm-3 col-xs-4 criteria-radio<%= crypto_class %>">
      <div class="status-chooser">
      <%= f.form_group status_symbol do %>
        <%#
                       !!!!!  IMPORTANT  !!!!!
          The functionality below is mirrored in assets/project-form.js
          in the function "resetCriterionResult".  If you change the code
          below, change "resetCriterionResult" accordingly.
                       !!!!!!!!!!!!!!!!!!!!!!!
        %>
        <div class="col-xs-4 text-left block-left"><br>
          <% if criterion_result == :criterion_passing %>
            <%= image_tag(
                  'result_symbol_check.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.passing_alt')
                ) %>
          <% elsif criterion_result == :criterion_barely %>
            <%= image_tag(
                  'result_symbol_dash.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.barely_alt')
                ) %>
          <% elsif criterion_result == :criterion_failing %>
            <%= image_tag(
                  'result_symbol_x.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.failing_alt')
                ) %>
          <% else %>
            <%= image_tag(
                  'result_symbol_question.png', size: '40x40',
                    id: criterion.to_s + '_enough',
                    alt: t('projects.misc.in_javascript.unknown_alt')
                ) %>
          <% end %>
        <%#            !!!!!!!!!!!!!!!!!!!!!!!            %>
        </div>
        <div class="col-xs-4 col-xs-offset-2 col-sm-offset-1 text-left block-left">
          <fieldset>
          <legend class="hidden"><%= "Criterion [#{criterion}]" %></legend>
          <%= f.radio_button status_symbol, 'Met', label: t('criterion_status.Met'),
                                                   disabled: is_disabled %>
          <%= f.radio_button status_symbol, 'Unmet', label: t('criterion_status.Unmet'),
                                                     disabled: is_disabled  %>
          <% if criterion.na_allowed? %>
            <%= f.radio_button status_symbol, 'N/A', label: t('criterion_status.NA'),
                                                     disabled: is_disabled  %>
          <% end %>
          <%= f.radio_button status_symbol, '?', label: '?',
                                                 disabled: is_disabled  %>
          </fieldset>
        </div>
      <% end %>
    </div>
  </div>

  <div class='col-md-10 col-sm-9 col-xs-12 criteria-desc'>
    <br>
    <% if criterion.future? %>(<%= t('projects.misc.future_criterion') %>) <% end %>
    <%= sanitize criterion.description %>
    <% if criterion.met_url_required? %>(<%= t('projects.misc.url_required') %>) <% end %>
    <sup>[<%= criterion %>]</sup>
    <%= if criterion.details
          render(partial: "details",
            locals: {f: f, criterion: criterion,
                     details: criterion.details.html_safe})
        end %>
    <% if (is_disabled) %>
      <% if project_criterion_justification&.presence %>
        <% cache ['markdown', project.id, criterion.to_s,
                  project.lock_version] do %>
          <div class="justification-markdown">
            <%= markdown(project_criterion_justification) %>
          </div>
        <% end %>
      <% end %>
      <% if criterion_result == :criterion_url_required %>
        <p class="bg-warning"><%= t('projects.misc.url_required_warning') %></p>
      <% elsif criterion_result == :criterion_justification_required %>
        <p class="bg-warning"><%= t('projects.misc.justification_required_warning') %></p>
      <% end %>
    <% else %>
      <%= f.text_area justification_symbol,
                      class: 'justification-text', hide_label: true,
                      lang: 'en', spellcheck: true,
                      placeholder:t('projects.misc.in_javascript.unknown_placeholder'),
                      disabled: is_disabled %>
    <% end %>
    <% if is_last %>
      <br>
    <% else %>
      <hr>
    <% end %>
    </div>
{'fraction_non_alphanumeric': 0.14960321348094446, 'fraction_numerical': 0.0054864308807681, 'mean_word_length': 1.9099201824401368, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 163, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2000891', 'n_tokens_mistral': 3233, 'n_tokens_neox': 2851, 'n_words': 514}