Closed Bug 1677856 Opened 5 years ago Closed 5 years ago

template string not terminated when containing optional chaining

Categories

(DevTools :: Source Editor, defect)

Firefox 82
defect

Tracking

(firefox85 fixed)

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: matze.kind, Assigned: bomsy)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0

Steps to reproduce:

Have a template string with optional chaining inside, e.g.
const a = asdf${a?.b}1234

Look at the code iIn the debugger view

Actual results:

the closing curly bracket is not beeing detected as the terminator for the JS part, so any code that follows that statement is displayed in blue (as string content).

Expected results:

the closing curly bracket should terminate the js part and the next ` the template string, so that the following code is parsed as code

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Debugger
Product: Firefox → DevTools

Thanks for the report!

I can reproduce the problem on my machine (Win10, Nightly)

@Hubert, could this be CodeMirror issue?

Honza

Severity: -- → S3
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Flags: needinfo?(hmanilla)
Priority: -- → P3

Thanks Honza.

Yeah ... looks like it.
i filed an issue
https://github.com/codemirror/CodeMirror/issues/6500

Flags: needinfo?(hmanilla)
Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
Component: Debugger → Source Editor

The component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3dc5333dfc77 [devtools] Update codemirror javascript mode r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: