| 1 | use MooseX::Declare; | ||
| 2 | |||
| 3 | class Gitalist::ContentMangler::Transformer::SyntaxHighlight { | ||
| 4 | method transform($c, $config) { | ||
| 5 | $c->stash( | ||
| 6 | syntax_css => $c->uri_for("/static/css/syntax/$config->{css}.css"), | ||
| 7 | mangled => 1, | ||
| 8 | ); | ||
| 9 | for (grep $_, $c->stash->{blobs} ? @{$c->stash->{blobs}} : $c->stash->{blob}) { | ||
| 10 | $_ = $c->view('SyntaxHighlight')->render($c, $_, $config); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | } |