Skip to content

Commit 0b34986

Browse files
committed
[color] attempt Win newline fix
Appveyor fails with os.linesep in fstring
1 parent d090afd commit 0b34986

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/fdiff/color.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ def color_unified_diff_line(line):
2424
on the unified diff line type."""
2525
if line[0:2] == "+ ":
2626
return f"{green_start}{line}{reset}"
27-
elif line == f"+{os.linesep}":
27+
elif line == "+\n":
2828
# some lines are formatted as hyphen only with no other characters
2929
# this indicates an added empty line
3030
return f"{green_start}{line}{reset}"
3131
elif line[0:2] == "- ":
3232
return f"{red_start}{line}{reset}"
33-
elif line == f"-{os.linesep}":
33+
elif line == "-\n":
3434
# some lines are formatted as hyphen only with no other characters
3535
# this indicates a deleted empty line
3636
return f"{red_start}{line}{reset}"

0 commit comments

Comments
 (0)