lib/css_parser/regexps.rb in css_parser-1.6.0 vs lib/css_parser/regexps.rb in css_parser-1.7.0

- old
+ new

@@ -52,16 +52,16 @@ RE_BORDER_STYLE = /([\s]*^)?(none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset)([\s]*$)?/imx RE_BORDER_UNITS = Regexp.union(BOX_MODEL_UNITS_RX, /(thin|medium|thick)/i) # Patterns for specificity calculations - NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX= / - (\.[\w]+) # classes + NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX_NC= / + (?:\.[\w]+) # classes | - \[(\w+) # attributes + \[(?:\w+) # attributes | - (\:( # pseudo classes + (?:\:(?: # pseudo classes link|visited|active |hover|focus |lang |target |enabled|disabled|checked|indeterminate @@ -70,13 +70,13 @@ |first-child|last-child|first-of-type|last-of-type |only-child|only-of-type |empty|contains )) /ix - ELEMENTS_AND_PSEUDO_ELEMENTS_RX = / - ((^|[\s\+\>\~]+)[\w]+ # elements + ELEMENTS_AND_PSEUDO_ELEMENTS_RX_NC = / + (?:(?:^|[\s\+\>\~]+)[\w]+ # elements | - \:{1,2}( # pseudo-elements + \:{1,2}(?: # pseudo-elements after|before |first-letter|first-line |selection ) )/ix