diff --git a/progit/__init__.py b/progit/__init__.py index de59a40..4e23601 100644 --- a/progit/__init__.py +++ b/progit/__init__.py @@ -244,6 +244,9 @@ def format_ts(string): def format_loc(loc, commit=None, prequest=None, index=None): """ Template filter putting the provided lines of code into a table """ + if loc is None: + return + output = [ '
', '' @@ -385,6 +388,8 @@ def markdown_filter(text): @APP.template_filter('html_diff') def html_diff(diff): """Display diff as HTML""" + if diff is None: + return return highlight( diff, DiffLexer(),