X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FHTML%2FZoom%2FParser%2FBuiltIn.pm;h=de65f0839997f46ef66a9091bf2fbaa509f20b3c;hb=6cae1842a9743546e55ef1670692944eb1e2259e;hp=b55cc4d231044a4b3b66a7d7200a4ab88d497f5d;hpb=a7643d601cc39d5bc5a6b5c9cf9c4b15a3140f1a;p=catagits%2FHTML-Zoom.git diff --git a/lib/HTML/Zoom/Parser/BuiltIn.pm b/lib/HTML/Zoom/Parser/BuiltIn.pm index b55cc4d..de65f08 100644 --- a/lib/HTML/Zoom/Parser/BuiltIn.pm +++ b/lib/HTML/Zoom/Parser/BuiltIn.pm @@ -18,6 +18,10 @@ sub html_to_stream { sub _hacky_tag_parser { my ($text, $handler) = @_; + $text =~ m{^([^<]*)}g; + if ( length $1 ) { # leading PCDATA + $handler->({ type => 'TEXT', raw => $1 }); + } while ( $text =~ m{ (