Skip to content

Commit

Permalink
no need for values
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 13, 2015
1 parent 3374566 commit e6162e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/DOM/CSS.pm
Expand Up @@ -129,7 +129,7 @@ sub _equation {
return [0, $1] if $equation =~ /^\s*((?:\+|-)?\d+)\s*$/;

# "4n", "+4n", "-4n", "4n+1" or "4n-1"
return [1, 1]
return []
unless $equation =~ /^\s*((?:\+|-)?(?:\d+)?)?n\s*((?:\+|-)\s*\d+)?\s*$/i;
return [$1 eq '-' ? -1 : $1 eq '' ? 1 : $1, join('', split(' ', $2 // 0))];
}
Expand Down

0 comments on commit e6162e3

Please sign in to comment.