Regex is wrongly highlighted in console
Reported by
hakerh403@gmail.com,
May 19 2017
|
|||||
Issue descriptionUserAgent: 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: 1. Type the following JavaScript code in the Chrome's console: console.log(0&&[.../\//],1); What is the expected behavior? The output is ok. Chrome correctly interprets the code. However, it is wrongly highlighted as a comment, not as a regular expression. What went wrong? I see green highlighting (used to highlight comments) instead of regex highlighting, which should be red. Did this work before? No Chrome version: 58.0.3029.110 Channel: stable OS Version: 6.3 Flash Version: The flash is disabled. I think it is because Chrome doesn't expect spread operator to be placed before regex. However, it is allowed according to the standard.
,
May 22 2017
,
May 23 2017
Interesting cases! einbinder@, can we make the codeMirror highlighter detect these, or is this something better filed on their project?
,
May 25 2017
Issue 725361 has been merged into this issue.
,
Nov 15 2017
Issue 725484 has been merged into this issue.
,
Jun 28 2018
Seems to be fixed in 67.0.3396.87
,
Jul 9
Thank you for verifying. I can also confirm it is fixed in 67.0.3396.99. I'd guess this was fixed in the last CodeMirror roll. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by hakerh403@gmail.com
, May 19 2017