lib/csscss/reporter.rb in csscss-0.2.0 vs lib/csscss/reporter.rb in csscss-0.2.1
- old
+ new
@@ -8,15 +8,15 @@
verbose = options.fetch(:verbose, false)
should_color = options.fetch(:color, true)
io = StringIO.new
@redundancies.each do |selector_groups, declarations|
- selector_groups = selector_groups.map {|selectors| maybe_color("{#{selectors}}", :red, should_color) }
+ selector_groups = selector_groups.map {|selectors| "{#{maybe_color(selectors, :red, should_color)}}" }
last_selector = selector_groups.pop
count = declarations.size
io.puts %Q(#{selector_groups.join(", ")} AND #{last_selector} share #{maybe_color(count, :red, should_color)} rule#{"s" if count > 1})
if verbose
- declarations.each {|dec| io.puts(maybe_color(" - #{dec}", :yellow, should_color)) }
+ declarations.each {|dec| io.puts(" - #{maybe_color(dec, :yellow, should_color)}") }
end
end
io.rewind
io.read