<commit_before># frozen_string_literal: true

include ERB::Util

module ApplicationHelper
  def title(text)
    content_for :title, text
    text
  end

  @markdown_renderer = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new)
  def render_markdown(text)
    @markdown_renderer.render text
  end

  @current_dropdown_is_active = nil
  def nav_link(cls, options = {}, &block)
    Rack::MiniProfiler.step("Generating nav_link: #{cls}") do
      options[:active] ||= []
      options[:attrs] ||= {}
      options[:attrs][:class] ||= []
      options[:action] ||= :index
      cls ||= options[:controller]
<commit_msg>Class instance vars resolve to nil, have to use class constants<commit_after># frozen_string_literal: true

include ERB::Util

module ApplicationHelper
  def title(text)
    content_for :title, text
    text
  end

  RENDERER = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new)
  def render_markdown(text)
    RENDERER.render text
  end

  @current_dropdown_is_active = nil
  def nav_link(cls, options = {}, &block)
    Rack::MiniProfiler.step("Generating nav_link: #{cls}") do
      options[:active] ||= []
      options[:attrs] ||= {}
      options[:attrs][:class] ||= []
      options[:action] ||= :index
      cls ||= options[:controller]

{'fraction_non_alphanumeric': 0.1386687797147385, 'fraction_numerical': 0.0, 'mean_word_length': 4.113360323886639, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '907307', 'n_tokens_mistral': 416, 'n_tokens_neox': 409, 'n_words': 86}