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

Javascript regex syntax highlighting fails for !/regex/.test #91906

Closed
qsniyg opened this issue Mar 2, 2020 · 2 comments
Closed

Javascript regex syntax highlighting fails for !/regex/.test #91906

qsniyg opened this issue Mar 2, 2020 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) grammar Syntax highlighting grammar javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@qsniyg
Copy link

qsniyg commented Mar 2, 2020

Issue Type: Bug

If parenthesis aren't added around /regex/.test(...), syntax highlighting for the regex fails (and occasionally it will break the syntax highlighting for code below it as well)

// regex syntax highlighting fails
if (!/[test]test/.test(test)) {
    console.log("test");
}

// regex syntax highlighting succeeds
if (!(/[test]test/.test(test))) {
    console.log("test");
}

VS Code version: Code - OSS 1.42.1 (c47d83b, 2020-02-17T09:32:31.598Z)
OS version: Linux x64 5.5.5-zen1-1-zen

@vscodebot
Copy link

vscodebot bot commented Mar 2, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 2, 2020

Duplicate of microsoft/TypeScript-TmLanguage#806

@mjbvz mjbvz marked this as a duplicate of microsoft/TypeScript-TmLanguage#806 Mar 2, 2020
@mjbvz mjbvz closed this as completed Mar 2, 2020
@mjbvz mjbvz self-assigned this Mar 2, 2020
@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) grammar Syntax highlighting grammar javascript JavaScript support issues upstream-issue-linked This is an upstream issue that has been reported upstream labels Mar 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) 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