Closed Bug 1308742 Opened 8 years ago Closed 8 years ago

Line breaks show up as \n in the new console frontend

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox49 unaffected, firefox50 unaffected, firefox51 unaffected, firefox52 verified)

VERIFIED FIXED
Firefox 52
Tracking Status
firefox49 --- unaffected
firefox50 --- unaffected
firefox51 --- unaffected
firefox52 --- verified

People

(Reporter: mstange, Assigned: Honza)

References

Details

(Keywords: regression)

Attachments

(1 file)

console.log("Hello\nWorld") shows

> Hello\nWorld

but it should show

> Hello
> World

That's what the old console did and it's also what other browsers are doing.
This is due to the use of Reps in the new console frontend. Honza, what do you think about this one?
Flags: needinfo?(odvarko)
Priority: -- → P3
Attached patch bug1308742.patchSplinter Review
(In reply to Lin Clark [:linclark] from comment #2)
> This is due to the use of Reps in the new console frontend. Honza, what do
> you think about this one?

This looks like a bug for me. String rep should preserve line breaks.

Patch attached.

Honza
Assignee: nobody → odvarko
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Attachment #8801709 - Flags: review?(lclark)
Comment on attachment 8801709 [details] [diff] [review]
bug1308742.patch

Review of attachment 8801709 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM, thanks!
Attachment #8801709 - Flags: review?(lclark) → review+
Thanks for the review!

Honza
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/480e384e3e66
Preserve line breaks in String rep; r=linclark
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/480e384e3e66
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
I verified this on Mac OS X 10.10 with FF Nightly 52.0a1(2016-10-19) I can confirm the fix. The bug is no longer reproducible.
Status: RESOLVED → VERIFIED
Version: unspecified → Trunk
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: