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: else:
formatter = TerminalFormatter() formatter = TerminalFormatter()
while True: write(highlight(sys.stdin.read(), lexer, formatter))
try:
item = sys.stdin.readline()
except KeyboardInterrupt:
break
if not item:
break
colored = highlight(item, lexer, formatter)
write(colored)
# if color # if color
else: else: