projects
/
catagits/HTML-Zoom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Improve [attr~="value"] selector (attribute contains word)
[catagits/HTML-Zoom.git]
/
lib
/
HTML
/
Zoom
/
SelectorParser.pm
diff --git
a/lib/HTML/Zoom/SelectorParser.pm
b/lib/HTML/Zoom/SelectorParser.pm
index
929e9a7
..
48545ff
100644
(file)
--- a/
lib/HTML/Zoom/SelectorParser.pm
+++ b/
lib/HTML/Zoom/SelectorParser.pm
@@
-88,7
+88,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/;
}
};