<commit_before><%
  css = []
  css << "selected" if selected_page?(menu_branch) or descendant_page_selected?(menu_branch)
  css << "first" if menu_branch_counter == 0
  css << "last" if menu_branch_counter == (sibling_count ||= menu_branch.shown_siblings.size)
  domid = "item_#{menu_branch_counter}" unless menu_branch.parent_id.present? or menu_branch.title.blank?
-%>
<% if menu_branch.in_menu? %>
  <li<%= " class='#{css.join(' ')}'" if css.present? -%><%= " id='#{domid}'" if domid.present? -%>>
    <%= link_to menu_branch.title, menu_branch.url %>
    <%
      unless hide_children or
        menu_branch.parent_id.present? or
        (children = Page.find(:all, :conditions => "parent_id = #{menu_branch.id}").collect{|c| c if c.in_menu? }.compact).empty?
    -%>
      <ul class='clearfix'>
        <%= render :partial => "/shared/menu_branch",<commit_msg>Fix bug that was introduced that threw out page ordering in the menu<commit_after><%
  css = []
  css << "selected" if selected_page?(menu_branch) or descendant_page_selected?(menu_branch)
  css << "first" if menu_branch_counter == 0
  css << "last" if menu_branch_counter == (sibling_count ||= menu_branch.shown_siblings.size)
  domid = "item_#{menu_branch_counter}" unless menu_branch.parent_id.present? or menu_branch.title.blank?
-%>
<% if menu_branch.in_menu? %>
  <li<%= " class='#{css.join(' ')}'" if css.present? -%><%= " id='#{domid}'" if domid.present? -%>>
    <%= link_to menu_branch.title, menu_branch.url %>
    <%
      unless hide_children or
        menu_branch.parent_id.present? or
        (children = menu_branch.children.collect{|c| c if c.in_menu?}.compact).empty?
    -%>
      <ul class='clearfix'>
        <%= render :partial => "/shared/menu_branch",
{'fraction_non_alphanumeric': 0.1723147616312464, 'fraction_numerical': 0.0011487650775416428, 'mean_word_length': 4.123529411764705, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 22, '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': '2275284', 'n_tokens_mistral': 618, 'n_tokens_neox': 603, 'n_words': 119}