Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added compound selector support for :not pseudo class without marking…
… it as a feature (since the CSS4 selector spec is still unfinished)
  • Loading branch information
kraih committed Jan 6, 2014
1 parent c9f389f commit 6b60eb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.67 2014-01-05
4.67 2014-01-06

4.66 2014-01-04
- Added success attribute to Test::Mojo.
Expand Down
7 changes: 2 additions & 5 deletions lib/Mojo/DOM/CSS.pm
Expand Up @@ -129,10 +129,7 @@ sub _compile {
while ($pc =~ /$PSEUDO_CLASS_RE/g) {

# "not"
if ($1 eq 'not') {
my $subpattern = _compile($2)->[-1][-1];
push @$selector, ['pc', 'not', $subpattern];
}
if ($1 eq 'not') { push @$selector, ['pc', 'not', _compile($2)] }

# Everything else
else { push @$selector, ['pc', $1, $2] }
Expand Down Expand Up @@ -213,7 +210,7 @@ sub _pc {
}

# ":not"
elsif ($class eq 'not') { return 1 if !_selector($args, $current) }
elsif ($class eq 'not') { return 1 if !_match($args, $current, $current) }

# ":nth-*"
elsif ($class =~ /^nth-/) {
Expand Down

0 comments on commit 6b60eb2

Please sign in to comment.