Strip strings after pygments, so we don’t include an needless newline.

This commit is contained in:
Emmanuel Gil Peyrot 2015-08-08 15:40:30 +01:00 committed by Florent Le Coz
parent 2da9e35cbc
commit 9fbacf377a

View file

@ -174,7 +174,7 @@ def _get_highlight():
def __init__(self, string):
self.string = string
def __str__(self):
return highlight(str(self.string).strip(), LEXER, FORMATTER)
return highlight(str(self.string), LEXER, FORMATTER).strip()
return Highlighter
except ImportError: