diff --git a/dpaste/highlight.py b/dpaste/highlight.py index 59ba8f8..f0d247d 100644 --- a/dpaste/highlight.py +++ b/dpaste/highlight.py @@ -150,7 +150,7 @@ def pygmentize(code_string, lexer_name=LEXER_DEFAULT): # Plain code is not highlighted, but we wrap with with regular # Pygments syntax to keep the frontend aligned. if lexer_name == PLAIN_CODE: - return '\n'.join(['{}'.format(escape(l)) + return '\n'.join(['{}'.format(escape(l) or '') for l in code_string.splitlines()]) # Everything else is handled by Pygments. diff --git a/dpaste/templates/dpaste/highlight/code.html b/dpaste/templates/dpaste/highlight/code.html index ae45cff..569a2e3 100644 --- a/dpaste/templates/dpaste/highlight/code.html +++ b/dpaste/templates/dpaste/highlight/code.html @@ -1 +1 @@ -