<commit_before>require 'tadpole'

module YARD
  Template = ::Tadpole
  Template.register_template_path(TEMPLATE_ROOT)
  
  module Templates
    def self.render(options = {})
      options[:format] ||= :text
      options[:type] ||= options[:object].type if options[:object]
      options[:template] ||= :default
      options[:serializer] = nil

      mod = Template.template(options[:template], options[:type])
      mod.run(options)
    end
  end
end

module Tadpole
  module SectionProviders
    class SectionProvider
      def self.provides?(object, basename) 
        self.const_get("EXTENSIONS").any? do |ext|
          extra = self == TemplateProvider ? "" : ".#{object.format.to_s}"
          path = basename + extra + ext
          if path_suitable?(path) 
            object.extend(Generators::Helpers::BaseHelper)
            object.extend(Generators::Helpers::HtmlHelper) if object.format == :html
            return path
          end<commit_msg>Don't override existing serializer<commit_after>require 'tadpole'

module YARD
  Template = ::Tadpole
  Template.register_template_path(TEMPLATE_ROOT)
  
  module Templates
    def self.render(options = {})
      options[:format] ||= :text
      options[:type] ||= options[:object].type if options[:object]
      options[:template] ||= :default
      options[:serializer] ||= nil

      mod = Template.template(options[:template], options[:type])
      mod.run(options)
    end
  end
end

module Tadpole
  module SectionProviders
    class SectionProvider
      def self.provides?(object, basename) 
        self.const_get("EXTENSIONS").any? do |ext|
          extra = self == TemplateProvider ? "" : ".#{object.format.to_s}"
          path = basename + extra + ext
          if path_suitable?(path) 
            object.extend(Generators::Helpers::BaseHelper)
            object.extend(Generators::Helpers::HtmlHelper) if object.format == :html
            return path
          end
{'fraction_non_alphanumeric': 0.12004121586810922, 'fraction_numerical': 0.0, 'mean_word_length': 2.9471544715447155, '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': '733337', 'n_tokens_mistral': 562, 'n_tokens_neox': 558, 'n_words': 118}