<commit_before># :stopdoc:
# This file makes Haml work with Rails
# using the > 2.0.1 template handler API.

module Haml
  class Template
    include Compilable if defined?(ActionView::TemplateHandlers::Compilable)

    def self.line_offset
      1
    end
 
    def line_offset
      self.class.line_offset
    end

    def initialize(view)
      @view = view
    end

    def compile(template)
      options = Haml::Template.options.dup
      Haml::Engine.new(template, options).send(:precompiled_with_ambles, [])
    end
  end
end

ActionView::Base.register_template_handler(:haml, Haml::Template)
# :startdoc:
<commit_msg>Actually add compatibility with edge rails (I hope).<commit_after># :stopdoc:
# This file makes Haml work with Rails
# using the > 2.0.1 template handler API.

module Haml
  class Template
    include ActionView::TemplateHandlers::Compilable if defined?(ActionView::TemplateHandlers::Compilable)

    def self.line_offset
      1
    end
 
    def line_offset
      self.class.line_offset
    end

    def initialize(view)
      @view = view
    end

    def compile(template)
      options = Haml::Template.options.dup
      Haml::Engine.new(template, options).send(:precompiled_with_ambles, [])
    end
  end
end

ActionView::Base.register_template_handler(:haml, Haml::Template)
# :startdoc:

{'fraction_non_alphanumeric': 0.093111279333838, 'fraction_numerical': 0.006056018168054504, 'mean_word_length': 3.48135593220339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2855665', 'n_tokens_mistral': 423, 'n_tokens_neox': 406, 'n_words': 103}