lib/css_parser.rb in css_parser-1.17.1 vs lib/css_parser.rb in css_parser-1.19.0

- old
+ new

@@ -109,10 +109,10 @@ #-- # Thanks to Rafael Salazar and Nick Fitzsimons on the css-discuss list for their help. #++ def self.calculate_specificity(selector) a = 0 - b = selector.scan(/\#/).length + b = selector.scan('#').length c = selector.scan(NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX_NC).length d = selector.scan(ELEMENTS_AND_PSEUDO_ELEMENTS_RX_NC).length "#{a}#{b}#{c}#{d}".to_i rescue