diff --git a/dpaste/templatetags/dpaste_tags.py b/dpaste/templatetags/dpaste_tags.py index 8ec2b3f..487311b 100644 --- a/dpaste/templatetags/dpaste_tags.py +++ b/dpaste/templatetags/dpaste_tags.py @@ -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 \ No newline at end of file + return h.splitlines() diff --git a/dpaste/tests/test_snippet.py b/dpaste/tests/test_snippet.py index 65de29f..28e0605 100644 --- a/dpaste/tests/test_snippet.py +++ b/dpaste/tests/test_snippet.py @@ -60,4 +60,4 @@ class SnippetTestCase(TestCase): response = self.client.post(response.request['PATH_INFO'], data, follow=True) self.assertContains(response, data['content']) self.assertEqual(response.status_code, 200) - self.assertEqual(Snippet.objects.count(), 2) \ No newline at end of file + self.assertEqual(Snippet.objects.count(), 2)