Skip to content

Commit

Permalink
Reset color at end of each line (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed Feb 16, 2023
1 parent 576cb84 commit 76ce293
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions topy/topy.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ def is_color_output_required(stream):
def add_output_color(line):
"""Adds color to the output of the diff lines."""
if line.startswith('+'):
line = f'\033[1;32m{line}'
line = f'\033[1;32m{line}\033[0m'
elif line.startswith('-'):
line = f'\033[1;31m{line}'
return f'{line}\033[0m'
line = f'\033[1;31m{line}\033[0m'
return line


def handle_file(regs, filename):
Expand Down

0 comments on commit 76ce293

Please sign in to comment.