->then
->replace(sub {
my $sel = $to_replace[0]->{attrs}{'data-replace'};
- $orig->collect($sel, { into => \my @replace_with })->run;
+ my $content = $sel =~ s/^content-of:\s*//;
+ $orig->collect($sel, {
+ into => \my @replace_with,
+ content => $content
+ })->run;
HTML::Zoom::ArrayStream->new({ array => \@replace_with })
})
->to_stream;