diff --git a/progit/__init__.py b/progit/__init__.py index 47b9f26..40c117d 100644 --- a/progit/__init__.py +++ b/progit/__init__.py @@ -238,7 +238,7 @@ def format_ts(string): @APP.template_filter('format_loc') -def format_loc(loc, commit=None, prequest=None): +def format_loc(loc, commit=None, prequest=None, index=None): """ Template filter putting the provided lines of code into a table """ output = [ @@ -257,19 +257,23 @@ def format_loc(loc, commit=None, prequest=None): for key in comments: comments[key] = sorted(comments[key], key=lambda obj: obj.date_created) + if not index: + index = '' + cnt = 1 for line in loc.split('\n'): if commit: output.append( '
'
''
'