aboutsummaryrefslogtreecommitdiff
path: root/views/blob.html
diff options
context:
space:
mode:
authorAlberto Bertogli <albertito@blitiri.com.ar>2012-11-14 01:48:46 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2012-11-18 15:55:22 +0100
commit62da3ebc08949d60a9d7b6ce84d9fe6ed68110db (patch)
treed94cf05ed4cc34ebdeb8413d7ed59887f082ef62 /views/blob.html
parentba3b2132f5ffa852579734a350104a719f654b64 (diff)
downloadgit-arr-fork-62da3ebc08949d60a9d7b6ce84d9fe6ed68110db.zip
Use heuristics to decide what to colorize
In practise pygments seems to have a very hard time processing large files and files with long lines, so try to avoid using it in those cases. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Diffstat (limited to 'views/blob.html')
-rw-r--r--views/blob.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/views/blob.html b/views/blob.html
index 4d5f7d0..283bbcd 100644
--- a/views/blob.html
+++ b/views/blob.html
@@ -36,7 +36,7 @@
<a href="">{{!fname.html}}</a>
</h3>
-% if has_colorizer():
+% if can_colorize(blob):
{{!colorize_blob(fname.unicode, blob)}}
% else:
<pre class="blob-body">