251: diff does not reflect leading (and meaningful) whitespace changes

timothys*********@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Oct. 12, 2007
What's the URL of the page containing the problem?

  http://reviewboard.eng.vmware.com/r/4065/diff/

Line 108 in the diff has a leading whitespace change, which is meaningful
since it is python, however, the change is not highlighted.

What steps will reproduce the problem?
1. Post a review that has leading whitespace change.
2. Go to the diff page.

What is the expected output? What do you see instead?

At least for whitespace-sensitive languages, the change should be
highlighted like a non-whitespace change would be.

What operating system are you using? What browser?

Linux, Firefox 2.0

Please provide any additional information below.
chipx86
#1 chipx86
We should be highlighting it iff the line is a whitespace-only line. We need to
otherwise strip leading whitespace so that we don't mark entire indentation changes
as inserts/deletes/replaces.
  • +Component-DiffViewer
  • +chipx86
chipx86
#2 chipx86
The whitespace-only line changes I mentioned are actually preserved. There isn't a
good fix for your case, because the more common scenario is that indentation of large
blocks of code will change and we don't want to show that. Not even for Python and
such. I'm afraid I have no solution to this, as it's not really a bug and there's no
real way to predict that showing the leading whitespace would be beneficial or is
desired.
  • +WontFix