X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster%2FHTML.pm;h=7fa63f5fc94690df252b5a269770f82138732ed3;hb=031ffaf58cc26884316489ca7d99a867840bf957;hp=947f039238b0fb20ba4a638ae25dbad03609ddd0;hpb=89d8eeb764f8903d2f506124ff3dd93444d06d5d;p=plack-app-gruntmaster.git diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 947f039..7fa63f5 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -278,12 +278,13 @@ sub process_st { sub process_ed { my ($tree, %args) = @_; + $tree->content_handler(editorial => literal $args{editorial}); my $iter = sub { my ($data, $div) = @_; $div->set_child_content(class => 'value', $data->{value}); $div->set_child_content(class => 'solution', literal $data->{solution}); $div->fclass('problem')->namedlink($data->{id}, $data->{name}); }; - my @pb = map { @{$args{$_}} } qw/beginner easy medium hard/; + my @pb = map { @{$args{$_} // []} } qw/beginner easy medium hard/; $tree->fclass('well')->iter3(\@pb, $iter); }