Closed Bug 1235247 Opened 8 years ago Closed 1 year ago

Some scripts are not properly indented when prettified

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

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.
Priority: -- → P3
Product: Firefox → DevTools

Here is another case:

STR:

  1. 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

  1. 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

This is still an issue, evident on:

https://paste.ee/build/js/app-b3cbd5b2.js

Difficult to see where it goes wrong though.

Blocks: dbg-72

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')
};
Severity: normal → S3

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.

Flags: needinfo?(hmanilla)

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.

Flags: needinfo?(hmanilla)

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

I'll go ahead and close this, please file new bugs with specific case it you ever stumble upon this bug

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.