fix bug where first event isn't passed to filter during collect w/out inside
[catagits/HTML-Zoom.git] / lib / HTML / Zoom / SelectorParser.pm
index 929e9a7..9e96980 100644 (file)
@@ -1,7 +1,6 @@
 package HTML::Zoom::SelectorParser;
 
-use strict;
-use warnings FATAL => 'all';
+use strictures 1;
 use base qw(HTML::Zoom::SubObject);
 use Carp qw(confess);
 
@@ -88,7 +87,7 @@ sub _raw_parse_simple_selector {
         my $value = $2;
         sub {
           $_[0]->{attrs}{$attribute}
-          && grep { $_ eq $value } split(' ', $_[0]->{attrs}{$attribute});
+          && $_[0]->{attrs}{$attribute} =~ qr/\b\Q$value\E\b/;
         }
       };