96
96
color = self.colors[type]
97
97
if color is not None:
98
98
if self.check_style and bad_ws_match:
99
lt = terminal.colorstring(bad_ws_match.group(1).expandtabs(),
100
None, self.colors['leadingtabs'])
101
txt = terminal.colorstring(
102
bad_ws_match.group(2)[0:self.max_line_len], color)
103
longtxt = terminal.colorstring(
104
bad_ws_match.group(2)[self.max_line_len:],
105
color, self.colors['longline'])
106
tr_ws = terminal.colorstring(bad_ws_match.group(3), None,
107
self.colors['trailingspace'])
108
crlf = bad_ws_match.group(4)
109
item.contents = lt + txt + longtxt + tr_ws + crlf
99
#highlight were needed
100
item.contents = ''.join(terminal.colorstring(txt, color, bcol)
102
(bad_ws_match.group(1).expandtabs(),
103
self.colors['leadingtabs']),
104
(bad_ws_match.group(2)[0:self.max_line_len], None),
105
(bad_ws_match.group(2)[self.max_line_len:],
106
self.colors['longline']),
107
(bad_ws_match.group(3), self.colors['trailingspace'])
108
)) + bad_ws_match.group(4)
110
109
string = terminal.colorstring(str(item), color)
112
111
string = str(item)