Call the pygment highlighter on the whole input
This commit is contained in:
parent
c9cabb3666
commit
73e549d7e7
1 changed files with 1 additions and 9 deletions
10
colout.py
10
colout.py
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue