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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 '<td class="diff_header"%s>%s</td><td%snowrap="nowrap">%s</td>' \
% (id,linenum,css_class,text)
Comment thread
AA-Turner marked this conversation as resolved.
Outdated

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