From: Arthur Axel 'fREW' Schmidt Date: Thu, 27 May 2010 15:27:13 +0000 (-0500) Subject: E.class X-Git-Tag: release_0.009004~63 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTML-Zoom.git;a=commitdiff_plain;h=7871f2ffebae6e6cf2028cdca655049e0a034d8c E.class --- diff --git a/lib/HTML/Zoom/SelectorParser.pm b/lib/HTML/Zoom/SelectorParser.pm index ed1d586..007b250 100644 --- a/lib/HTML/Zoom/SelectorParser.pm +++ b/lib/HTML/Zoom/SelectorParser.pm @@ -46,6 +46,18 @@ sub _raw_parse_simple_selector { } }; + # 'el.class1' - element + class + + /\G$sel_re\.$sel_re/gc and + return do { + my $cls = $1; + my $name = $2; + sub { + $_[0]->{name} && $_[0]->{name} eq $name and + $_[0]->{attrs}{class} && $_[0]->{attrs}{class} eq $cls + } + }; + confess "Couldn't parse $_ as starting with simple selector"; } } @@ -69,7 +81,7 @@ sub parse_selector { } }; } -} - +} + 1;