Fix a bug in the statistics analyzer for rules with interpolation.

This commit is contained in:
Chris Eppstein 2010-08-27 09:30:01 -07:00
parent 576bf9d409
commit 8083760ef2

View File

@ -11,7 +11,7 @@ module Compass
def visit(node) def visit(node)
self.prop_count += 1 if node.is_a?(Sass::Tree::PropNode) && !node.children.any? self.prop_count += 1 if node.is_a?(Sass::Tree::PropNode) && !node.children.any?
if node.is_a?(Sass::Tree::RuleNode) if node.is_a?(Sass::Tree::RuleNode)
self.rule_count += node.rule.map{|r| r.split(/,/)}.flatten.compact.size self.rule_count += node.rule.reject{|r| r.is_a?(Sass::Script::Node)}.map{|r| r.split(/,/)}.flatten.compact.size
end end
self.mixin_def_count += 1 if node.is_a?(Sass::Tree::MixinDefNode) self.mixin_def_count += 1 if node.is_a?(Sass::Tree::MixinDefNode)
self.mixin_count += 1 if node.is_a?(Sass::Tree::MixinNode) self.mixin_count += 1 if node.is_a?(Sass::Tree::MixinNode)