Skip to content

Commit

Permalink
there is always a part
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 20, 2015
1 parent 26947c4 commit dbba0d1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Mojo/DOM/CSS.pm
Expand Up @@ -72,12 +72,11 @@ sub _compile {
my $css = "$_[0]";

my $pattern = [[]];
while (1) {

# Separator
my $part = $pattern->[-1];
while (my $part = $pattern->[-1]) {
push @$part, [] unless @$part && ref $part->[-1];
my $selector = $part->[-1];

# Separator
if ($css =~ /\G\s*,\s*/gc) { push @$pattern, [] }

# Combinator
Expand Down

0 comments on commit dbba0d1

Please sign in to comment.