Skip to content

Commit

Permalink
no need for interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 20, 2015
1 parent fc52a98 commit 64c45c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Mojo/DOM/CSS.pm
Expand Up @@ -14,7 +14,6 @@ my $ATTR_RE = qr/
)?
\]
/x;
my $PSEUDO_CLASS_RE = qr/:([\w\-]+)(?:\(((?:\([^)]+\)|[^)])+)\))?/;

sub matches {
my $tree = shift->tree;
Expand Down Expand Up @@ -96,7 +95,7 @@ sub _compile {
}

# Pseudo-class (":not" contains more selectors)
elsif ($css =~ s/^$PSEUDO_CLASS_RE//o) {
elsif ($css =~ s/^:([\w\-]+)(?:\(((?:\([^)]+\)|[^)])+)\))?//) {
push @$selector,
['pc', lc $1, $1 eq 'not' ? _compile($2) : _equation($2)];
}
Expand All @@ -107,7 +106,6 @@ sub _compile {
}

else {last}

}

return $pattern;
Expand Down

0 comments on commit 64c45c5

Please sign in to comment.