X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FHTML-Zoom.git;a=blobdiff_plain;f=lib%2FHTML%2FZoom%2FParser%2FBuiltIn.pm;fp=lib%2FHTML%2FZoom%2FParser%2FBuiltIn.pm;h=1e879191a3d6288d0b49c8e59c0075344a91fa4b;hp=de65f0839997f46ef66a9091bf2fbaa509f20b3c;hb=0c58a1e1705f0eafd1c6457ed5f26104e2bb4ad4;hpb=57076fa16f45eb212dac6cda4cf9231938479802 diff --git a/lib/HTML/Zoom/Parser/BuiltIn.pm b/lib/HTML/Zoom/Parser/BuiltIn.pm index de65f08..1e87919 100644 --- a/lib/HTML/Zoom/Parser/BuiltIn.pm +++ b/lib/HTML/Zoom/Parser/BuiltIn.pm @@ -16,6 +16,15 @@ sub html_to_stream { ->stream_from_array(@{$self->html_to_events($text)}); } +# DO NOT BE AFRAID. +# +# Well, ok. Be afraid. A little. But this is lexing HTML with a regexp, +# not really parsing (since the structure nesting isn't handled here) so +# it's relatively not dangerous. +# +# Certainly it's not really any more or any less heinous than anything else +# I could do in a handful of lines of pure perl. + sub _hacky_tag_parser { my ($text, $handler) = @_; $text =~ m{^([^<]*)}g;