Closed Bug 1438442 Opened 4 years ago Closed 4 years ago

Empty "styled unit" in console.log renders as a space

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

Steps to reproduce:
1. Open the console
2. Evaluate `console.log("%cHello%c|%cWorld", "color:red", "", "color: blue")`


Expected results:

I see the following output : "Hello|World"

Actual results:

I see the following output : "Hello | World"

---

i.e The second styled unit is wrapped by single spaces.

This is a new frontend issue only
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Comment on attachment 8951671 [details]
Bug 1438442 - Fix styled console.log issue with empty style; .

https://reviewboard.mozilla.org/r/220968/#review227182

Looks reasonable, thanks.

Honza
Attachment #8951671 - Flags: review?(odvarko) → review+
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/48fb17a12bb4
Fix styled console.log issue with empty style; r=Honza.
https://hg.mozilla.org/mozilla-central/rev/48fb17a12bb4
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
I have reproduced this bug with Nightly 60.0a1 (2018-02-14) on Windows 10, 64 Bit!

This bug's fix is verified with latest Nightly!

Build ID   : 20180225100219
User Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
QA Whiteboard: [bugday-20180221]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.