<commit_before><tr>
  <% if measure_group == "specific_country" %>
    <td>
      <% if measure.geographical_area.children_geographical_areas.any? %>
      <dl>
        <dt class="has_children">
          <%= measure.geographical_area.description %>
        </dt>
      <dd>
        <ul>
          <% measure.geographical_area.children_geographical_areas.sort_by(&:iso_code).each do |children_geographical_area| %>
            <li><%= children_geographical_area.iso_code %> <%= children_geographical_area.description %></li>
          <% end %>
        </ul>
      </dd>
        <% else %>
          <%= measure.geographical_area.description %>
        <% end %>
    </td>
  <% end %>

  <td>
    <%= measure.measure_type_description %>
    <% if measure.order_number.present? %>
      <%= render measure.order_number %>
    <% end %>
  </td>

  <td><%= measure.duty_expression %></td>

  <td>
    <% if measure.additional_code.present? %>
      <%= link_to measure.additional_code,  "##{measure.additional_code.id}", class: 'reference', 'data-popup-ref' => "additional-code-#{measure.additional_code.id}" %>
    <% end %>
  </td>

  <td>
    <% if measure.measure_conditions.any? %>
      <%= link_to "View Conditions",  "##{measure.id}", class: 'reference', 'data-popup-ref' => "conditions-#{measure.id}" %>
    <% end %>
  </td>

  <td><%= measure.excluded_country_list %></td>

  <td><%= link_to measure.legal_act.generating_regulation_code, measure.legal_act.url, target: '_blank', rel: 'external' %></td>

  <td>
      <% measure.footnotes.each do |footnote| %>
        <%= link_to footnote.code, "##{footnote.id}", class: 'reference', 'data-popup-ref' => "footnote-#{footnote.id}" %>&nbsp;
      <% end %>
  </td>
</tr><commit_msg>Temporary fix for footnotes sorting to help with manual testing<commit_after><tr>
  <% if measure_group == "specific_country" %>
    <td>
      <% if measure.geographical_area.children_geographical_areas.any? %>
      <dl>
        <dt class="has_children">
          <%= measure.geographical_area.description %>
        </dt>
      <dd>
        <ul>
          <% measure.geographical_area.children_geographical_areas.sort_by(&:iso_code).each do |children_geographical_area| %>
            <li><%= children_geographical_area.iso_code %> <%= children_geographical_area.description %></li>
          <% end %>
        </ul>
      </dd>
        <% else %>
          <%= measure.geographical_area.description %>
        <% end %>
    </td>
  <% end %>

  <td>
    <%= measure.measure_type_description %>
    <% if measure.order_number.present? %>
      <%= render measure.order_number %>
    <% end %>
  </td>

  <td><%= measure.duty_expression %></td>

  <td>
    <% if measure.additional_code.present? %>
      <%= link_to measure.additional_code,  "##{measure.additional_code.id}", class: 'reference', 'data-popup-ref' => "additional-code-#{measure.additional_code.id}" %>
    <% end %>
  </td>

  <td>
    <% if measure.measure_conditions.any? %>
      <%= link_to "View Conditions",  "##{measure.id}", class: 'reference', 'data-popup-ref' => "conditions-#{measure.id}" %>
    <% end %>
  </td>

  <td><%= measure.excluded_country_list %></td>

  <td><%= link_to measure.legal_act.generating_regulation_code, measure.legal_act.url, target: '_blank', rel: 'external' %></td>

  <td>
      <% measure.footnotes.sort.each do |footnote| %>
        <%= link_to footnote.code, "##{footnote.id}", class: 'reference', 'data-popup-ref' => "footnote-#{footnote.id}" %>&nbsp;
      <% end %>
  </td>
</tr>
{'fraction_non_alphanumeric': 0.18946474086661003, 'fraction_numerical': 0.0, 'mean_word_length': 3.0090805902383657, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 117, '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': '5697977', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1154, 'n_words': 192}