<commit_before>module ArticleHelper

  class CodeRayify < Redcarpet::Render::HTML
    # custom parser, as per Redcarpet's instructions
    def block_code(code, language)
      # set a default language in case it isn't specified
      # setting default in arguments raises a bug
      language = :ruby if language == nil
      CodeRay.scan(code, language).div(line_numbers: :table, hard_wrap: true)
    end
  end

  def renderer
    options = {
      filter_html: true,
      hard_wrap: true
    }

    CodeRayify.new(options)
  end

  def markdown(content)
    options = {
      fenced_code_blocks: true,
      disable_indented_clode_blocks: true,
      autolink: true
    }

    markdown = Redcarpet::Markdown.new(renderer, options)
    markdown.render(content).html_safe
  end

  def format_date(time)
    time.strftime("%e %b %Y")
  end

  def current_user
    @current_user ||= true
  end<commit_msg>remove the sessions controller; not quite working<commit_after>module ArticleHelper

  class CodeRayify < Redcarpet::Render::HTML
    # custom parser, as per Redcarpet's instructions
    def block_code(code, language)
      # set a default language in case it isn't specified
      # setting default in arguments raises a bug
      language = :ruby if language == nil
      CodeRay.scan(code, language).div(line_numbers: :table, hard_wrap: true)
    end
  end

  def renderer
    options = {
      filter_html: true,
      hard_wrap: true
    }

    CodeRayify.new(options)
  end

  def markdown(content)
    options = {
      fenced_code_blocks: true,
      disable_indented_clode_blocks: true,
      autolink: true
    }

    markdown = Redcarpet::Markdown.new(renderer, options)
    markdown.render(content).html_safe
  end

  def format_date(time)
    time.strftime("%e %b %Y")
  end
{'fraction_non_alphanumeric': 0.08319374651032943, 'fraction_numerical': 0.0, 'mean_word_length': 3.0542986425339365, 'pattern_counts': {'":': 0, '<': 5, '<?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': '790174', 'n_tokens_mistral': 577, 'n_tokens_neox': 545, 'n_words': 152}