From: Arthur Axel 'fREW' Schmidt Date: Sun, 11 Apr 2010 07:38:27 +0000 (-0500) Subject: E#id X-Git-Tag: release_0.009004~62 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=32ea0d1e04c5ece6a425bed0339995986dd93eef;hp=7871f2ffebae6e6cf2028cdca655049e0a034d8c;p=catagits%2FHTML-Zoom.git E#id --- diff --git a/lib/HTML/Zoom/SelectorParser.pm b/lib/HTML/Zoom/SelectorParser.pm index 007b250..c485da4 100644 --- a/lib/HTML/Zoom/SelectorParser.pm +++ b/lib/HTML/Zoom/SelectorParser.pm @@ -58,6 +58,18 @@ sub _raw_parse_simple_selector { } }; + # 'el#id' - element + id + + /\G$sel_re#$sel_re/gc and + return do { + my $id = $1; + my $name = $2; + sub { + $_[0]->{name} && $_[0]->{name} eq $name and + $_[0]->{attrs}{id} && $_[0]->{attrs}{id} eq $id + } + }; + confess "Couldn't parse $_ as starting with simple selector"; } }