Sha256: 42d7a460a34d28b6b2f3511277160659e1464ede2a17ebf9e8d6cde08d89d141

Contents?: true

Size: 446 Bytes

Versions: 11

Compression:

Stored size: 446 Bytes

Contents

class SCSSBeautifier::Formatters::Comment < Sass::Tree::Visitors::Base
  def visit_comment(node)
    # require 'pry'; binding.pry
    format_comment(node)# if !node.invisible?
  end

  def format_comment(node)
    node.value.first.gsub!(/\/\*\s?/, "// ")
    node.value.last.gsub!(/\*\//, "")
    # require 'pry'; binding.pry
    node.value.each do |item|
      if String === item
        item.gsub!(/\n\s?/, "\n// ")
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
scss_beautifier-0.1.11 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.10 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.8 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.7 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.6 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.5 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.4 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.3 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.2 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.1 lib/scss_beautifier/formatters/comment.rb
scss_beautifier-0.1.0 lib/scss_beautifier/formatters/comment.rb