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:
|
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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue