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

negated regex with positive lookbehind inside parentheses breaks highlighting #92694

Closed
pushkine opened this issue Mar 14, 2020 · 3 comments
Closed
Assignees
Labels
upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@pushkine
Copy link

pushkine commented Mar 14, 2020

const x = 0
;/\n/g.test(x)
if (!/(?<=a)bc/.test(x)) {
    const x = 0
    ;/\n/g.test(x)
}

Code_2020-03-14_16-08-47

1.43

it has issues coloring const, export and I think class methods but it will not break everything right away, I did not manage to find what but combining this with some specific regex or template literal further in the file eventually breaks it completely

possibly related to microsoft/TypeScript-TmLanguage#809

@gjsjohnmurray
Copy link
Contributor

Looks like this is the same as microsoft/TypeScript-TmLanguage#806

@pushkine
Copy link
Author

pushkine commented Mar 15, 2020

actually the bug happens with any regex that includes a ? as long as it is preceded by a !

!/x?/

the issue linked by @gjsjohnmurray only breaks highlighting within the regex, this one breaks it for the rest of the file

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 16, 2020

Duplicate of microsoft/TypeScript-TmLanguage#806

@mjbvz mjbvz closed this as completed Mar 16, 2020
@mjbvz mjbvz added the upstream-issue-linked This is an upstream issue that has been reported upstream label Mar 16, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

3 participants