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

{ in regex confuses indentation #141816

Closed
thebinarysearchtree opened this issue Jan 30, 2022 · 2 comments · Fixed by #141997
Closed

{ in regex confuses indentation #141816

thebinarysearchtree opened this issue Jan 30, 2022 · 2 comments · Fixed by #141997
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues insiders-released Patch has been released in VS Code Insiders typescript Typescript support issues verified Verification succeeded
Milestone

Comments

@thebinarysearchtree
Copy link
Contributor

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

  • VS Code Version: 1.63.2
  • OS Version: MacOS Monterey

Steps to Reproduce:

  1. Create a JavaScript file.
  2. Type const r = /{/;
  3. Press enter.
  4. The next line is indented because it doesn't realise the { is in a regular expression.
@IllusionMH
Copy link
Contributor

/assign mjbvz -Tyriar

@vscode-triage-bot vscode-triage-bot assigned mjbvz and unassigned Tyriar Jan 30, 2022
@ArturoDent
Copy link

It looks like it is looking for a matching closing bracket.

Indent: const r = /{/;
Indent: const r = /\{/;

No Indent: const r = /{}/;
No Indent: const r = /\{\}/;

This was referenced Feb 2, 2022
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues typescript Typescript support issues and removed triage-needed labels Feb 3, 2022
@mjbvz mjbvz added this to the February 2022 milestone Feb 3, 2022
@IanMatthewHuff IanMatthewHuff added the verified Verification succeeded label Feb 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-autoindent Editor auto indentation issues insiders-released Patch has been released in VS Code Insiders typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@IanMatthewHuff @thebinarysearchtree @IllusionMH @Tyriar @mjbvz @ArturoDent and others