Skip to content

Commit

Permalink
DarkWidgets: Fix test_widgets::test_truncate_result_with_different_input
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Oct 30, 2018
1 parent d72ded2 commit 344dae5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spyder/plugins/findinfiles/tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_truncate_result_with_different_input(qtbot, line_input):
else:
line_input_expected = line_input

expected_result = u'%s<b>%s</b>%s' % (
expected_result = u'<span style="color:None">%s<b>%s</b>%s</span>' % (
line_input_expected[:slice_start],
line_input_expected[slice_start:slice_end],
line_input_expected[slice_end:])
Expand Down
3 changes: 2 additions & 1 deletion spyder/plugins/findinfiles/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,8 @@ def html_escape(text):
if len(right) > max_num_char_fragment:
right = right[:30] + ellipsis

line_match_format = u'<span style="color:{0}">{{0}}<b>{{1}}</b>{{2}}'
line_match_format = (u'<span style="color:{0}">{{0}}'
'<b>{{1}}</b>{{2}}</span>')
line_match_format = line_match_format.format(self.text_color)

left = html_escape(left)
Expand Down

0 comments on commit 344dae5

Please sign in to comment.