Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS incorrectly highlights template strings syntax #90821

Closed
dwelle opened this issue Feb 17, 2020 · 1 comment
Closed

JS incorrectly highlights template strings syntax #90821

dwelle opened this issue Feb 17, 2020 · 1 comment
Assignees
Labels
grammar Syntax highlighting grammar javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@dwelle
Copy link

dwelle commented Feb 17, 2020

  • VSCode Version: 1.42.1; 1.43.0-insider
  • OS Version: win7

What

VSCode JS/TS syntax highlighter doesn't parse template strings correctly in special circumstances:

image

Steps to Reproduce:

enter this JS code:

if ( !/\(/.test("a") ) {} // negation of a regex necessary

if ( true ) {
    obj[prop]; // obj property access inside a conditional necessary
}

const str = `template:string`;
//               \_ not recognized as template string (the colon is necessary)

// VSCode thinks *this* is template string

Does this issue occur when all extensions are disabled?: Yes

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 18, 2020

Duplicate of microsoft/TypeScript-TmLanguage#806

@mjbvz mjbvz closed this as completed Feb 18, 2020
@mjbvz mjbvz added grammar Syntax highlighting grammar javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream labels Feb 18, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

2 participants