aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_wiki/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django/git_wiki/views.py')
-rw-r--r--bn_django/git_wiki/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bn_django/git_wiki/views.py b/bn_django/git_wiki/views.py
index 5a4efbd..dcd1646 100644
--- a/bn_django/git_wiki/views.py
+++ b/bn_django/git_wiki/views.py
@@ -224,6 +224,12 @@ def view_commit(request, hash):
c = Commit(id=hash)
c.update()
+ from pygments import highlight
+ from pygments.lexers import DiffLexer
+ from pygments.formatters import HtmlFormatter
+
+ c.pretty_diff = highlight(c.rawdiff, DiffLexer(), HtmlFormatter())
+
return render_to_response('git_wiki/commit.html',
dict(heads=heads, tags=tags,
commit=c))