Some scripts are not properly indented when prettified
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
People
(Reporter: ntim, Unassigned)
References
(Blocks 1 open bug)
Details
I also have this problem (FF 43). Here is the minified js file: https://paste.ee/p/oFdwm This is what FF dev tools' pretty print makes out of it: https://paste.ee/p/E2e0I Please note that line indentation works up to line 12638, after this line all indentation is gone. Line indentation does work with Chrome dev tools.
Updated•7 years ago
|
Updated•6 years ago
|
Comment 2•5 years ago
|
||
Here is another case:
STR:
- Pretty-print the following line:
(function(a){if(0){switch(a){default:break}if(0){1}if(0){1}if(0){1}}})();if(0){if(0){if(0){if(0){2}}}}
AR: Syntax of all functions following "switch" is pushed to the left
ER: Syntax should be displayed in a normal way
- If you're not convinced, add
;if(0){if(0){if(0){if(0){3}}}}
to the line in Step 1 and try again.
It's from bug 1261971 (dup)
Honza
Updated•5 years ago
|
Comment 4•5 years ago
|
||
This is still an issue, evident on:
https://paste.ee/build/js/app-b3cbd5b2.js
Difficult to see where it goes wrong though.
Comment 6•5 years ago
|
||
Here's another example:
var mhp_Rh = function (a) {
var b = [
],
c = mhp_f(function (d) {
void 0 !== this.w[d] && b.push(d + '=' + this.w[d])
}, a);
c('md');
c('k');
c('ck');
c('ct');
c('am');
c('rs');
return a.H + b.join('/')
},
mhp_Qh = function (a, b) {
return a.w[b] ? a.w[b] : null
},
mhp_Sh = function (a, b, c) {
c ? a.w[b] = c : delete a.w[b]
},
mhp_Th = function (a) {
return (a = mhp_Qh(a, 'm')) ? a.split(',') : [
]
};
mhp_Oh.prototype.getMetadata = function () {
return '1' == mhp_Qh(this, 'md')
};
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 3 duplicates.
:bomsy, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 9•2 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Comment 10•2 years ago
|
||
I created a page with the available STR from this bug https://ffx-devtools-pretty-print.glitch.me/ , and for each of them, ran pretty print
- Case from comment 0 is not available
- Case from comment 1 is fine
- Cases from comment 2 are fine
- Case from comment 4 is not available
- Case from comment 6 is fine
I'll go ahead and close this, please file new bugs with specific case it you ever stumble upon this bug
Description
•