New issue
Advanced search Search tips

Issue 725482 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 725484
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Console - regex is highlighted like a comment while dividing an object in escaped sequence of a template literal string

Reported by hakerh403@gmail.com, May 23 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
Test case:
    `${{}/ /\//}`;

What is the expected behavior?
Regex should be highlighted like regex, not like a comment.

What went wrong?
It is highlighted like a comment.
I am pretty sure that the problem is because in escaping sequence of template literal string an expression should be expected. But, Chrome expects code block instead. So, "{}" is an object, but Chrome thinks it is a code block. After that, "/" is division, but Chrome thinks it is start of new expression (and also a regular expression) and highlights it like a regex. So, it is clear what is happening, now "//" is highlighted like a comment, but it is part of a regex.

Did this work before? No 

Chrome version: 58.0.3029.110  Channel: stable
OS Version: 6.3
Flash Version: No flash
 
Cc: mmanchala@chromium.org
Mergedinto: 725484
Status: Duplicate (was: Unconfirmed)
Seems this issue is similar to  issue 725484 . Hence merging into it.

Please feel free to undupe if not similar.

Thanks.

Sign in to add a comment