<commit_before>module PufferPages
  module Renderable
    extend ActiveSupport::Concern

  private

    def normalize_render_options options
      if options.is_a?(Hash) && (options.key?(:drops) || options.key?(:registers))
        drops = options[:drops] || {}
        registers = options[:registers] || {}
      else
        drops = options
        registers = {}
      end
      {:drops => drops.stringify_keys!, :registers => registers.symbolize_keys!}
    end

    def render_liquid template, page, options = {}
      template = ::Liquid::Template.parse(template)

      if options.is_a?(::Liquid::Context)
        template.render(options)
      else
        options = normalize_render_options(options)
        tracker = PufferPages::Liquid::Tracker.new
        tracker.cleanup template.render!(options[:drops], :registers => {
          :file_system => PufferPages::Liquid::FileSystem.new,
          :tracker => tracker,
          :page => page
        }.reverse_merge!(options[:registers]))
      end

    end

  end
end<commit_msg>Removed bang<commit_after>module PufferPages
  module Renderable
    extend ActiveSupport::Concern

  private

    def normalize_render_options options
      if options.is_a?(Hash) && (options.key?(:drops) || options.key?(:registers))
        drops = options[:drops] || {}
        registers = options[:registers] || {}
      else
        drops = options
        registers = {}
      end
      {:drops => drops.stringify_keys!, :registers => registers.symbolize_keys!}
    end

    def render_liquid template, page, options = {}
      template = ::Liquid::Template.parse(template)

      if options.is_a?(::Liquid::Context)
        template.render(options)
      else
        options = normalize_render_options(options)
        tracker = PufferPages::Liquid::Tracker.new
        tracker.cleanup template.render(options[:drops], :registers => {
          :file_system => PufferPages::Liquid::FileSystem.new,
          :tracker => tracker,
          :page => page
        }.reverse_merge!(options[:registers]))
      end

    end

  end
end
{'fraction_non_alphanumeric': 0.12283236994219653, 'fraction_numerical': 0.0, 'mean_word_length': 2.7763636363636364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '2642497', 'n_tokens_mistral': 618, 'n_tokens_neox': 600, 'n_words': 114}