projects
/
catagits/Gitalist.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Don't attempt to syntax highlight anything big.
[catagits/Gitalist.git]
/
lib
/
Gitalist
/
View
/
SyntaxHighlight.pm
diff --git
a/lib/Gitalist/View/SyntaxHighlight.pm
b/lib/Gitalist/View/SyntaxHighlight.pm
index
9c28341
..
4f675ab
100644
(file)
--- a/
lib/Gitalist/View/SyntaxHighlight.pm
+++ b/
lib/Gitalist/View/SyntaxHighlight.pm
@@
-17,6
+17,9
@@
sub process {
sub render {
my ($self, $c, $blob, $args) = @_;
+
+ # Don't bother with anything over 64kb, it'll be tragically slow.
+ return encode_entities $blob if length $blob > 8192;
my $lang = $args->{language};