Issue1054821
Created on 2004-10-26 19:44 by dmgass, last changed 2004-11-12 16:13 by tim_one.
| Messages (2) | |||
|---|---|---|---|
| msg22882 - (view) | Author: Dan Gass (dmgass) | Date: 2004-10-26 19:44 | |
difflib.py -- rev 1.27 class - HtmlDiff method - _make_line line numbers 1370 thru 1371 was: if len(text) <= 1: text = ' '+text should be: if not text: text = ' ' This code was intended to show an "add" highlight in the case of inserted blank lines. It was originally coded to look for lines of length 1 or less to accomodate lines where the newline character is not stripped off. The undesired effect is that lines containing only one character (such as a open or close {} for a 'c' function) that are in column zero get represented with a space infront of it. Since newlines are stripped before this code is executed (a code change done after this logic was written) the above fix eliminates the undesired effect without sacrificing anything. The test for this module will not break as a result of this change. If it is desired, I can modify the test to cover this code. It would involve adding a blank line and possibly a one character line to the test input and then rebaselining the output. |
|||
| msg22883 - (view) | Author: Tim Peters (tim_one) | Date: 2004-11-12 16:13 | |
Logged In: YES user_id=31435 Done; thanks! Lib/difflib.py 1.28 Please attach a patch next time. It's almost impossible to read code correctly after SF finishes mangling text. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2004-10-26 19:44:24 | dmgass | create | |