<commit_before>require File.dirname(__FILE__) + '/../sass'
require 'sass/tree/node'
require 'strscan'

module Sass
  # :stopdoc:
  module Tree
    class Node
      def to_sass(opts = {})
        result = ''

        children.each do |child|
          result << "#{child.to_sass(0, opts)}\n"
        end

        result
      end
    end

    class ValueNode
      def to_sass(tabs)
        "#{value}\n"
      end
    end

    class RuleNode
      def to_sass(tabs, opts = {})
        str = "\n#{'  ' * tabs}#{rule}\n"

        children.each do |child|
          str << "#{child.to_sass(tabs + 1, opts)}"
        end

        str
      end
    end

    class AttrNode<commit_msg>Minor beautification of generated Sass (http://pastie.org/189024)<commit_after>require File.dirname(__FILE__) + '/../sass'
require 'sass/tree/node'
require 'strscan'

module Sass
  # :stopdoc:
  module Tree
    class Node
      def to_sass(opts = {})
        result = ''

        children.each do |child|
          result << "#{child.to_sass(0, opts)}\n"
        end

        result
      end
    end

    class ValueNode
      def to_sass(tabs)
        "#{value}\n"
      end
    end

    class RuleNode
      def to_sass(tabs, opts = {})
        str = "\n#{'  ' * tabs}#{rule}#{children.find{|c| c.is_a? AttrNode } ? "\n" : ''}"

        children.each do |child|
          str << "#{child.to_sass(tabs + 1, opts)}"
        end

        str
      end
    end

    class AttrNode
{'fraction_non_alphanumeric': 0.13658201784488674, 'fraction_numerical': 0.0068634179821551134, 'mean_word_length': 1.7877629063097515, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1149418', 'n_tokens_mistral': 515, 'n_tokens_neox': 499, 'n_words': 117}