Sometimes developers will annoyingly add/remove spaces/tabs in their updates. Standalone diff programs normally have an option to ignore whitespace so it would be good if the AMO one did also.
Assignee: nobody → mbasta
Severity: normal → enhancement
Priority: -- → P3
Whiteboard: [required amo-editors]
Target Milestone: --- → Q3 2011
Assignee: mbasta → nobody
Priority: P3 → P5
Target Milestone: Q3 2011 → Future
Assignee: nobody → maglione.k
Whiteboard: [required amo-editors] → [required amo-editors][patch][needs review]
Quickly I think something like: http://github.com/andymckay/zamboni/commit/73a745 Around line 70, v. small change, will remove whitespace from diffs.
Kris: can you review andy's patch in comment 2?
It appears to work for me in the general case, but I think stripping all white space may be too extreme, as it will ignore merged identifiers and the like. One of the following would be better, I think: line.trim().replace(/\s+/g, " "); or line.trim() .replace(/\s+/g, " ") .replace(/([^a-z0-9_$]) | (?![a-z0-9_$])/gi, "$1"); so that " foo bar [ baz ] " -> "foo bar[baz]"
It looks like when lines compare identical, the lines from the right (-) are chosen rather than from the left (+), which leads to some formatting issues. It may be easiest just to switch the sides as we pass them to the diff engine and reverse the indicators we add in prettyHtml.
Who can review this patch?
Whiteboard: [required amo-editors][patch][needs review] → [patch][needs review][ReviewTeam]
Resetting a bunch of missed milestones. Sorry for the bugspam.
Target Milestone: Q3 2011 → ---
Bad news: All patches disappeared, so we have to start over. Good news: Kris gave me a rough draft I can use to come up with a patch. It could take a little while, maybe next week.
Assignee: kmaglione+bmo → mail
Whiteboard: [patch][needs review][ReviewTeam] → [ReviewTeam]
Kris says he will send you some cookies if you fix this ;)
Kris has this been accidentally fixed by your work on the source/diff viewer by any chance?
Not as far as I know. What makes you think that?
Heh. OK. I have other file viewer bugs to fix now anyway.
Assignee: awagner → kmaglione+bmo
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.