lib/scss_lint/linter/zero_unit.rb in scss-lint-0.21.0 vs lib/scss_lint/linter/zero_unit.rb in scss-lint-0.22.0

- old
+ new

@@ -2,9 +2,11 @@ # Checks for unnecessary units on zero values. class Linter::ZeroUnit < Linter include LinterRegistry def visit_script_string(node) + return unless node.type == :identifier + node.value.scan(ZERO_UNIT_REGEX) do |match| add_lint(node, MESSAGE_FORMAT % match.first) end end