X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FGitalist%2FController%2FFragment%2FRef.pm;h=549e4a32a997d61da2c8c652033d35481ba61282;hb=5424d43cfc22b9afebb5aa29222a105ddb3cc253;hp=65e4a61e7da9f654daa8c6cee4831b541ecb2bf0;hpb=bb20c9689d647686500806d19aa93dee07e795a2;p=catagits%2FGitalist.git diff --git a/lib/Gitalist/Controller/Fragment/Ref.pm b/lib/Gitalist/Controller/Fragment/Ref.pm index 65e4a61..549e4a3 100644 --- a/lib/Gitalist/Controller/Fragment/Ref.pm +++ b/lib/Gitalist/Controller/Fragment/Ref.pm @@ -27,7 +27,6 @@ sub _diff { diff => $patch, # XXX Hack hack hack, see View::SyntaxHighlight blobs => [map $_->{diff}, @$patch], - language => 'Diff', %filename, ); } @@ -35,7 +34,7 @@ sub _diff { after diff_fancy => sub { my ($self, $c) = @_; $self->_diff($c); - $c->forward('View::SyntaxHighlight'); + $c->forward('Model::ContentMangler'); }; after diff_plain => sub { @@ -65,12 +64,10 @@ after blame => sub { my $blame = $c->stash->{Commit}->blame($c->stash->{filename}, $c->stash->{Commit}->sha1); $c->stash( blame => $blame, - # XXX Hack hack hack, see View::SyntaxHighlight - language => ($c->stash->{filename} =~ /\.p[lm]$/i ? 'Perl' : ''), blob => join("\n", map $_->{line}, @$blame), ); - $c->forward('View::SyntaxHighlight') + $c->forward('Model::ContentMangler') unless $c->stash->{no_wrapper}; }; @@ -83,13 +80,11 @@ The blob action i.e the contents of a file. after blob => sub { my ( $self, $c ) = @_; $c->stash( - # XXX Hack hack hack, see View::SyntaxHighlight - language => ($c->stash->{filename} =~ /\.p[lm]$/i ? 'Perl' : ''), is_image => File::Type::WebImages::mime_type($c->stash->{blob}), is_binary => Gitalist::Utils::is_binary($c->stash->{blob}), ); - $c->forward('View::SyntaxHighlight') + $c->forward('Model::ContentMangler') unless $c->stash->{no_wrapper}; };