my $author_templ = $static_dir . "/author-html/$author.html";
if (-f $author_templ) {
- $_[0]->replace(HTML::Zoom->from_file($author_templ));
+ $_[0]->replace(sub {
+ HTML::Zoom->from_file($author_templ)->collect('body', {
+ into => \my @replace_with,
+ })->run;
+ HTML::Zoom::ArrayStream->new({ array => \@replace_with })
+ });
} else {
$_[0]->replace('');
}