Show More
@@ -2405,7 +2405,7 b' def diffsinglehunk(hunklines):' | |||
|
2405 | 2405 | """yield tokens for a list of lines in a single hunk""" |
|
2406 | 2406 | for line in hunklines: |
|
2407 | 2407 | # chomp |
|
2408 | chompline = line.rstrip('\n') | |
|
2408 | chompline = line.rstrip('\r\n') | |
|
2409 | 2409 | # highlight tabs and trailing whitespace |
|
2410 | 2410 | stripline = chompline.rstrip() |
|
2411 | 2411 | if line.startswith('-'): |
@@ -2473,6 +2473,9 b' def diffsinglehunkinline(hunklines):' | |||
|
2473 | 2473 | isendofline = token.endswith('\n') |
|
2474 | 2474 | if isendofline: |
|
2475 | 2475 | chomp = token[:-1] # chomp |
|
2476 | if chomp.endswith('\r'): | |
|
2477 | chomp = chomp[:-1] | |
|
2478 | endofline = token[len(chomp):] | |
|
2476 | 2479 | token = chomp.rstrip() # detect spaces at the end |
|
2477 | 2480 | endspaces = chomp[len(token):] |
|
2478 | 2481 | # scan tabs |
@@ -2488,7 +2491,7 b' def diffsinglehunkinline(hunklines):' | |||
|
2488 | 2491 | if isendofline: |
|
2489 | 2492 | if endspaces: |
|
2490 | 2493 | yield (endspaces, 'diff.trailingwhitespace') |
|
2491 |
yield ( |
|
|
2494 | yield (endofline, '') | |
|
2492 | 2495 | nextisnewline = True |
|
2493 | 2496 | |
|
2494 | 2497 | def difflabel(func, *args, **kw): |
General Comments 0
You need to be logged in to leave comments.
Login now