You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a JavaScript file, type a statement containing a division operation (/) followed by a RegExp literal (/.*/) as part of the same statement e.g. var v = (a / b).toString().match(/\d*(\.\d+)?/)
The code highlighter does not highlight the statement properly e.g. in the example provided in step 1, the code highlighter thinks that the / in a / b is where the RegExp literal /\d*(\.\d+)?/ starts from and highlights the whole / b).toString().match(/\d*(\.\d+)?/ part one RegExp literal.
The same behaviour does not exhibit if the RegExp precedes a division operator in a similar fashion, e.g. in the statement var v = parseFloat(s.match(/\d*(\.\d+)?/).toString(), 10) / 2.5, the same RegExp literal is highlighted properly.
Example: (recreated from the "Steps to Reproduce" section)
Another example: (this one is caught in the wild, free-range and organic)
Please forgive the obscene, blasphemic JavaScript in the above example(s?). The point is, it's syntactically valid. Also, in my experience, this did not happen before the recent VSCode upgrade to 1.7.1 so I'm presuming this relates to something that was changed in 1.7.1.
The text was updated successfully, but these errors were encountered:
microsoft/TypeScript-TmLanguage#349 was marked fixed, and closed. So the TypeScript-TmLanguage files are actually embedded into the VSCode resources archive? And I can only see this fix in the next update? Which is next month?
Steps to Reproduce:
/
) followed by a RegExp literal (/.*/
) as part of the same statement e.g.var v = (a / b).toString().match(/\d*(\.\d+)?/)
/
ina / b
is where the RegExp literal/\d*(\.\d+)?/
starts from and highlights the whole/ b).toString().match(/\d*(\.\d+)?/
part one RegExp literal.var v = parseFloat(s.match(/\d*(\.\d+)?/).toString(), 10) / 2.5
, the same RegExp literal is highlighted properly.Example: (recreated from the "Steps to Reproduce" section)
Another example: (this one is caught in the wild, free-range and organic)
Please forgive the obscene, blasphemic JavaScript in the above example(s?). The point is, it's syntactically valid. Also, in my experience, this did not happen before the recent VSCode upgrade to 1.7.1 so I'm presuming this relates to something that was changed in 1.7.1.
The text was updated successfully, but these errors were encountered: