lib/css_parser/parser.rb in css_parser-1.4.5 vs lib/css_parser/parser.rb in css_parser-1.4.6
- old
+ new
@@ -78,9 +78,11 @@
# Finds the rule sets that match the given selectors
def find_rule_sets(selectors, media_types = :all)
rule_sets = []
selectors.each do |selector|
+ selector.gsub!(/\s+/, ' ')
+ selector.strip!
each_rule_set(media_types) do |rule_set, media_type|
if !rule_sets.member?(rule_set) && rule_set.selectors.member?(selector)
rule_sets << rule_set
end
end