<commit_before><%
# = List of available variables
# * @blog           => data from the blog configuration file
# * @entries        => an array of all available blog entries
# * @tags           => a hash of the form: {name => array of entries}
# * @archives       => a hash of the form: {name => array of entries}
# * @chapters       => an array of objects like @tags and @archives
# * @page_title     => title of the HTML page
# * @page_content   => body of the HTML page
%>
<%
  # Recursively expands the given @blog.navigation data structure into an itemized list of links.
  def navigation_to_html aLink
    result = ''

    if aLink.respond_to? :to_ary
      aLink.each do |link|
        result << navigation_to_html(link)
      end
    elsif aLink.respond_to? :each_pair
      aLink.each_pair do |name, url|
        link = if url.respond_to? :to_ary
          "#{name.capitalize} <ul>#{navigation_to_html url}</ul>"
        else
          %{<a href="#{u url}">#{name}</a>}
        end

        result << "<li>#{link}</li>"
      end
    else<commit_msg>fix URLs in navigation links need not be escaped<commit_after><%
# = List of available variables
# * @blog           => data from the blog configuration file
# * @entries        => an array of all available blog entries
# * @tags           => a hash of the form: {name => array of entries}
# * @archives       => a hash of the form: {name => array of entries}
# * @chapters       => an array of objects like @tags and @archives
# * @page_title     => title of the HTML page
# * @page_content   => body of the HTML page
%>
<%
  # Recursively expands the given @blog.navigation data structure into an itemized list of links.
  def navigation_to_html aLink
    result = ''

    if aLink.respond_to? :to_ary
      aLink.each do |link|
        result << navigation_to_html(link)
      end
    elsif aLink.respond_to? :each_pair
      aLink.each_pair do |name, url|
        link = if url.respond_to? :to_ary
          "#{name.capitalize} <ul>#{navigation_to_html url}</ul>"
        else
          %{<a href="#{url}">#{name}</a>}
        end

        result << "<li>#{link}</li>"
      end
    else
{'fraction_non_alphanumeric': 0.12005583992554676, 'fraction_numerical': 0.0, 'mean_word_length': 2.49025974025974, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 35, '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': '713534', 'n_tokens_mistral': 663, 'n_tokens_neox': 659, 'n_words': 226}