vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb in radiant-0.7.2 vs vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb in radiant-0.8.0

- old
+ new

@@ -62,11 +62,11 @@ # * <tt>:not(expr)</tt> -- Match an element that does not match the # negation expression. # # When using a combination of the above, the element name comes first # followed by identifier, class names, attributes, pseudo classes and - # negation in any order. Do not seprate these parts with spaces! + # negation in any order. Do not separate these parts with spaces! # Space separation is used for descendant selectors. # # For example: # selector = HTML::Selector.new "form.login[action=/login]" # The matched element must be of type +form+ and have the class +login+. @@ -156,11 +156,11 @@ # * <tt>:nth-last-of-type(..)</tt> -- As above, but counts from the last child and # only elements of its type. # * <tt>:not(selector)</tt> -- Match the element only if the element does not # match the simple selector. # - # As you can see, <tt>:nth-child<tt> pseudo class and its varient can get quite + # As you can see, <tt>:nth-child<tt> pseudo class and its variant can get quite # tricky and the CSS specification doesn't do a much better job explaining it. # But after reading the examples and trying a few combinations, it's easy to # figure out. # # For example: @@ -554,10 +554,10 @@ attributes << ["class", class_name] "" # Remove end # Attribute value. - next if statement.sub!(/^\[\s*([[:alpha:]][\w\-]*)\s*((?:[~|^$*])?=)?\s*('[^']*'|"[^*]"|[^\]]*)\s*\]/) do |match| + next if statement.sub!(/^\[\s*([[:alpha:]][\w\-:]*)\s*((?:[~|^$*])?=)?\s*('[^']*'|"[^*]"|[^\]]*)\s*\]/) do |match| name, equality, value = $1, $2, $3 if value == "?" value = values.shift else # Handle single and double quotes.