Call the pygment highlighter on the whole input

This commit is contained in:
Nicolas Pouillard 2013-03-25 00:08:53 +01:00
commit 73e549d7e7

View file

@ -422,15 +422,7 @@ if __name__ == "__main__":
else:
formatter = TerminalFormatter()
while True:
try:
item = sys.stdin.readline()
except KeyboardInterrupt:
break
if not item:
break
colored = highlight(item, lexer, formatter)
write(colored)
write(highlight(sys.stdin.read(), lexer, formatter))
# if color
else: