Issue metadata
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
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by mmanchala@chromium.org
, May 24 2017Mergedinto: 725484
Status: Duplicate (was: Unconfirmed)