Closed
Bug 675016
Opened 15 years ago
Closed 2 years ago
Have Diff viewer ignore whitespace
Categories
(addons.mozilla.org Graveyard :: Admin/Editor Tools, enhancement, P5)
addons.mozilla.org Graveyard
Admin/Editor Tools
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: eviljeff, Unassigned)
Details
(Whiteboard: [ReviewTeam:P2])
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.
Updated•15 years ago
|
Assignee: nobody → mbasta
Severity: normal → enhancement
Priority: -- → P3
Whiteboard: [required amo-editors]
Target Milestone: --- → Q3 2011
Updated•15 years ago
|
Assignee: mbasta → nobody
Priority: P3 → P5
Target Milestone: Q3 2011 → Future
Comment 1•15 years ago
|
||
Assignee: nobody → maglione.k
Whiteboard: [required amo-editors] → [required amo-editors][patch][needs review]
Updated•15 years ago
|
Target Milestone: Future → 6.1.9
Comment 2•15 years ago
|
||
Quickly I think something like:
http://github.com/andymckay/zamboni/commit/73a745
Around line 70, v. small change, will remove whitespace from diffs.
Updated•15 years ago
|
Target Milestone: 6.1.9 → Q3 2011
Comment 4•15 years ago
|
||
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]"
Comment 5•15 years ago
|
||
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.
Comment 6•14 years ago
|
||
Who can review this patch?
Whiteboard: [required amo-editors][patch][needs review] → [patch][needs review][ReviewTeam]
Comment 7•14 years ago
|
||
Resetting a bunch of missed milestones. Sorry for the bugspam.
Target Milestone: Q3 2011 → ---
Comment 8•13 years ago
|
||
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]
Comment 9•13 years ago
|
||
Kris says he will send you some cookies if you fix this ;)
Updated•12 years ago
|
Whiteboard: [ReviewTeam] → [ReviewTeam:P2]
Comment 10•11 years ago
|
||
Kris has this been accidentally fixed by your work on the source/diff viewer by any chance?
Flags: needinfo?(kmaglione+bmo)
Comment 11•11 years ago
|
||
Not as far as I know. What makes you think that?
Flags: needinfo?(kmaglione+bmo)
Comment 12•11 years ago
|
||
Hope/despair...
Comment 13•11 years ago
|
||
Heh. OK. I have other file viewer bugs to fix now anyway.
Assignee: awagner → kmaglione+bmo
| Assignee | ||
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
Updated•10 years ago
|
Assignee: kmaglione+bmo → nobody
You need to log in
before you can comment on or make changes to this bug.
Description
•