Moar cleanup.

This commit is contained in:
Martin Mahner 2013-11-24 23:37:01 +01:00
parent 43f82ba42b
commit b4f01103dc
2 changed files with 3 additions and 9 deletions

View file

@ -8,12 +8,6 @@ def in_list(value, arg):
return value in arg
@register.filter
def highlight(snippet, maxlines=None):
def highlight(snippet):
h = pygmentize(snippet.content, snippet.lexer)
if not h:
s = snippet.content.splitlines()
s = h.splitlines()
if maxlines:
return s[:maxlines]
return s
return h.splitlines()