Closed Bug 1826930 Opened 1 year ago Closed 1 year ago

PrettyPrint doesn't handle spread operator on array literal very well

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce

  1. Navigate to data:text/html,<meta charset=utf8><script>x = [1, ...[2,3]]</script>
  2. Open the debugger, select the source (under (no domain))
  3. Click the pretty print icon

Expected results

The inline script is prettified like:

x = [
  1,
  ...[
    2,
    3
  ]
]

Actual results

The inline script is prettified like:

x = [
  1,
  ...[2,
  3]
]
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P3
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eacfc6bfd2ee
[devtools] Handle array literals placed after spread operator. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: