X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FHTML%2FZoom%2FFilterBuilder.pm;h=7f9b7b620854d8d29b04a8e28fd168f7081e049e;hb=c86c0ce201e10213574d57b6339aa6a9883135fa;hp=b82a85cc9fe90b4636d010d762fc253bbf3a286d;hpb=cac9d0a57eb15ed103010151543d25cf27f3b157;p=catagits%2FHTML-Zoom.git diff --git a/lib/HTML/Zoom/FilterBuilder.pm b/lib/HTML/Zoom/FilterBuilder.pm index b82a85c..7f9b7b6 100644 --- a/lib/HTML/Zoom/FilterBuilder.pm +++ b/lib/HTML/Zoom/FilterBuilder.pm @@ -138,12 +138,12 @@ sub collect { while (my ($evt) = $stream->next) { $depth++ if ($evt->{type} eq 'OPEN'); $depth-- if ($evt->{type} eq 'CLOSE'); + push(@$into, $evt) if $into; unless ($depth) { undef $stream; return $evt if $passthrough; return; } - push(@$into, $evt) if $into; return $evt if $passthrough; } die "Never saw closing before end of source";