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

Source hIghlight in javascript is broken while parsing regex with double quotes #90864

Closed
mykola-mokhnach opened this issue Feb 18, 2020 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@mykola-mokhnach
Copy link

mykola-mokhnach commented Feb 18, 2020

  • VSCode Version: 1.42.1
  • OS Version: Mac OS 10.15.3

Steps to Reproduce:

  1. Load appium-adb npm module into vscode from https://github.com/appium/appium-adb
  2. Open the file https://github.com/appium/appium-adb/blob/master/lib/tools/adb-commands.js in the edtor
  3. Scroll to the line https://github.com/appium/appium-adb/blob/68a62e860990b1cae7a768be415378de115f6841/lib/tools/adb-commands.js#L1901
    :
  if (!/\bresult=-1\b/.test(output) || !/\bdata="{/.test(output)) {
    log.debug(output);
    throw new Error('Cannot retrieve SMS list from the device. ' +
      'Check the server log for more details');
  }

regex

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

@alexr00
Copy link
Member

alexr00 commented Feb 18, 2020

The problem actually starts before the double quotes. The first regex in the if statement is scoped incorrectly too. It's the !/ that's causing problems.

@alexr00
Copy link
Member

alexr00 commented Feb 18, 2020

Looks like you're not the only one to find this @mykola-mokhnach. Duplicate of microsoft/TypeScript-TmLanguage#806

@alexr00 alexr00 added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 18, 2020
@alexr00 alexr00 closed this as completed 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
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants