<commit_before>require 'tilt'

module Tilt
  ### Stylus template implementation for `Tilt`.
  #
  # It can be used by the `Rails` Asset Pipeline or `Sinatra` applications.
  class StylusTemplate < Template
    self.default_mime_type = 'text/css'

    def self.engine_initialized?
      defined? ::Stylus
    end

    def prepare
      require_template_library 'stylus'
    end

    def evaluate(scope, locals, &block)
      if scope.respond_to?(:pathname)
        options[:filename] ||= scope.pathname.to_s
      end
      Stylus.compile(data, options)
    end
  end
end

Tilt.register Tilt::StylusTemplate, 'styl'<commit_msg>Tilt already knows about the actual file path.<commit_after>require 'tilt'

module Tilt
  ### Stylus template implementation for `Tilt`.
  #
  # It can be used by the `Rails` Asset Pipeline or `Sinatra` applications.
  class StylusTemplate < Template
    self.default_mime_type = 'text/css'

    def self.engine_initialized?
      defined? ::Stylus
    end

    def initialize_engine
      require_template_library 'stylus'
    end

    def prepare
      if self.file
        options[:filename] ||= self.file
      end
    end

    def evaluate(scope, locals, &block)
      @output ||= Stylus.compile(data, options)
    end
  end
end

Tilt.register Tilt::StylusTemplate, 'styl'
{'fraction_non_alphanumeric': 0.09056024558710668, 'fraction_numerical': 0.0, 'mean_word_length': 3.075, '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': '1830291', 'n_tokens_mistral': 427, 'n_tokens_neox': 415, 'n_words': 116}