<commit_before><%
  link_to_organisation ||= false
  logo_size ||= 'large'
  show_mainstream_links ||= false

  link_to_sub_organisation = link_to_organisation

  if organisation.organisation_type.sub_organisation?
    sub_organisation = organisation
    organisation = sub_organisation.parent_organisations.first
    link_to_organisation = true
    logo_size = 'large'
  else
    sub_organisation = nil
  end
%>
<header class="page-header">
  <%= content_tag :h1 do %>
    <% if link_to_organisation %>
      <%= link_to organisation, class: logo_classes(class_name: organisation.organisation_logo_type.class_name, size: logo_size, stacked: true) do %>
        <span><%= organisation_logo_name(organisation) %></span>
      <% end %>
    <% else %>
      <span class="<%= logo_classes(class_name: organisation.organisation_logo_type.class_name, size: logo_size, stacked: true) %>">
        <span><%= organisation_logo_name(organisation) %></span>
      </span>
    <% end %>
  <% end %>
  <% if sub_organisation %>
    <%= content_tag :div, class: "sub-organisation-name" do %>
      <h2>
        <% if link_to_sub_organisation %>
          <%= link_to sub_organisation.name, sub_organisation, class: "sub-organisation-name" %>
        <% else %>
          <%= sub_organisation.name %>
        <% end %>
      </h2>
    <% end %>
  <% end %>
  <% if show_mainstream_links && organisation.mainstream_links.any? && sub_organisation.nil? %>
    <aside class="organisation-mainstream-links">
      <%= render partial: 'shared/available_languages', locals: {object: @organisation} %>
      <ul>
        <% organisation.mainstream_links.only_the_initial_set.each do |link| %>
          <li><%= link_to link.title, link.url, ({rel: 'external'} if is_external?(link.url)) %></li>
        <% end %>
      </ul>
    </aside>
  <% end %>
</header>
<commit_msg>moved available languages so that tests don't break<commit_after><%
  link_to_organisation ||= false
  logo_size ||= 'large'
  show_mainstream_links ||= false

  link_to_sub_organisation = link_to_organisation

  if organisation.organisation_type.sub_organisation?
    sub_organisation = organisation
    organisation = sub_organisation.parent_organisations.first
    link_to_organisation = true
    logo_size = 'large'
  else
    sub_organisation = nil
  end
%>
<header class="page-header">
  <%= content_tag :h1 do %>
    <% if link_to_organisation %>
      <%= link_to organisation, class: logo_classes(class_name: organisation.organisation_logo_type.class_name, size: logo_size, stacked: true) do %>
        <span><%= organisation_logo_name(organisation) %></span>
      <% end %>
    <% else %>
      <span class="<%= logo_classes(class_name: organisation.organisation_logo_type.class_name, size: logo_size, stacked: true) %>">
        <span><%= organisation_logo_name(organisation) %></span>
      </span>
    <% end %>
  <% end %>
  <% if sub_organisation %>
    <%= content_tag :div, class: "sub-organisation-name" do %>
      <h2>
        <% if link_to_sub_organisation %>
          <%= link_to sub_organisation.name, sub_organisation, class: "sub-organisation-name" %>
        <% else %>
          <%= sub_organisation.name %>
        <% end %>
      </h2>
    <% end %>
  <% end %>
  <aside class="organisation-mainstream-links">
    <%= render partial: 'shared/available_languages', locals: {object: @organisation} %>
    <% if show_mainstream_links && organisation.mainstream_links.any? && sub_organisation.nil? %>
        <ul>
          <% organisation.mainstream_links.only_the_initial_set.each do |link| %>
            <li><%= link_to link.title, link.url, ({rel: 'external'} if is_external?(link.url)) %></li>
          <% end %>
        </ul>
    <% end %>
  </aside>

</header>

{'fraction_non_alphanumeric': 0.1459834534294102, 'fraction_numerical': 0.0016012810248198558, 'mean_word_length': 3.414605418138987, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '5382344', 'n_tokens_mistral': 1294, 'n_tokens_neox': 1188, 'n_words': 227}