529: Whitespace not ignored
- UserError
- Review Board
veste*****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
July 2, 2008 |
There is a bug in myersdiff.py in function _gen_diff_codes(self, lines). The "temp" is never assigned to "line". Change from: # We still want to show lines that contain only whitespace. if temp != "": line = temp To: # We still want to show lines that contain only whitespace. if temp != "": line = temp line = temp
sorry, ignore this. I had made some changes to the code which caused my problems.
But, what is the reason for: # We still want to show lines that contain only whitespace. if temp != "": line = temp ? This will show "empty"/"space diff only" lines as yellow. That might not always be desirable. It should also be an option if you want to do left strip only (as it is now), or both left and right strip, i.e., switch between if self.ignore_space: temp = line.lstrip() and if self.ignore_space: temp = line.strip()
Example of whitespace-only lines shown as different => confusing if there are a lot of other changes as well.
-
+
You're saying any lines containing only whitespace show up as that? That's certainly not happening in any install I've seen. Maybe I don't understand.
Yes, whitespace only. Using trunk version of reviewboard, svn diff.