Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Lib/difflib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1924,8 +1924,11 @@ def _format_line(self,side,flag,linenum,text):
# make space non-breakable so they don't get compressed or line wrapped
text = text.replace(' ',' ').rstrip()

return '<td class="diff_header"%s>%s</td><td nowrap="nowrap">%s</td>' \
% (id,linenum,text)
# add a class to the td tag if there is a difference on the line
css_class = ' class="diff_changed" ' if flag else ' '

return f'<td class="diff_header"{id}>{linenum}</td>' \
+ f'<td{css_class}nowrap="nowrap">{text}</td>'

def _make_prefix(self):
"""Create unique anchor prefixes"""
Expand Down
Loading
Loading