<commit_before><%# this is pretty bad code - need to rethink this one -%>
<% 
  css = []
	css << "selected" if selected_page?(page) or descendant_page_selected?(page)
	css << "first" if position == 0
	css << "last" if position == (siblings ||= page.shown_siblings).size
	domid = "#{page.title.gsub(" ", "_").downcase}_item" unless page.title.blank?

 	if page.in_menu?
-%>
<li<%= " class='#{css.join(' ')}'" unless css.blank? -%><%= " id='#{domid}'" unless domid.blank? -%>>
  <%= link_to page.title, page.url %>
	<% unless hide_children or page.children.empty? %>  
  	<ul class='clearfix'>
  		<% page.children.collect{|c| c if c.in_menu? }.compact.each do |child| -%>
				<% shown_siblings = child.shown_siblings %>
    		<%= render :partial => '/shared/menu_branch', :locals => {
					:page => child, 
					:position => page.children.index(child), 
					:root => false,
					:siblings => shown_siblings,
					:hide_children => hide_children
				} -%>
  		<% end %>
  	</ul>
	<% end %>
</li>
<% end -%><commit_msg>move this check up the chain so as not to render a useless ul<commit_after><%# this is pretty bad code - need to rethink this one -%>
<% 
  css = []
	css << "selected" if selected_page?(page) or descendant_page_selected?(page)
	css << "first" if position == 0
	css << "last" if position == (siblings ||= page.shown_siblings).size
	domid = "#{page.title.gsub(" ", "_").downcase}_item" unless page.title.blank?

 	if page.in_menu?
-%>
<li<%= " class='#{css.join(' ')}'" unless css.blank? -%><%= " id='#{domid}'" unless domid.blank? -%>>
  <%= link_to page.title, page.url %>
	<% unless hide_children or (children = page.children.collect{|c| c if c.in_menu? }.compact).empty? %>  
  	<ul class='clearfix'>
  		<% children.each do |child| -%>
				<% shown_siblings = child.shown_siblings %>
    		<%= render :partial => '/shared/menu_branch', :locals => {
					:page => child, 
					:position => page.children.index(child), 
					:root => false,
					:siblings => shown_siblings,
					:hide_children => hide_children
				} -%>
  		<% end %>
  	</ul>
	<% end %>
</li>
<% end -%>
{'fraction_non_alphanumeric': 0.20287081339712917, 'fraction_numerical': 0.0009569377990430622, 'mean_word_length': 3.4021052631578947, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 49, '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': '1791278', 'n_tokens_mistral': 862, 'n_tokens_neox': 769, 'n_words': 174}