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

Code formatter breaks with partially invalid syntax #15

Open
thesilican opened this issue Jan 18, 2024 · 0 comments
Open

Code formatter breaks with partially invalid syntax #15

thesilican opened this issue Jan 18, 2024 · 0 comments

Comments

@thesilican
Copy link

Installed product versions

  • Visual Studio Code: 1.85.1
  • This extension: 1.3.1

Description

Formatting code with partially invalid syntax causes code to be lost.

Steps to recreate

  1. Create a file with syntax in a manner similar to the below screenshots
  2. Format the code
  3. Code after broken syntax is lost

Before code formatting:

Screenshot 2024-01-18 at 10 07 29 AM

Afte code formatting:

Screenshot 2024-01-18 at 10 07 34 AM

Current behavior

All the code before the broken syntax is formatted properly, but everything after is deleted

Expected behavior

Formatting a file with invalid syntax should not do anything to the file.

@thesilican thesilican changed the title Code formatter is Code formatter breaks with partially invalid syntax Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant