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

Formatting Issue with Multi-line Comments and JSDocs in .res files #898

Open
Nellak2017 opened this issue Jan 23, 2024 · 0 comments
Open

Comments

@Nellak2017
Copy link

Description

I encounter a formatting issue when working with multi-line comments or JSDocs in ReScript using the extension. Each time I format the code, extra new lines are added, leading to inconsistent formatting. This behavior is affecting the readability and aesthetics of my code. Not only that but not being able to have JSDocs formatted correctly makes it harder to document and maintain my code base when working with ReScript.

Steps to Reproduce

  1. Write ReScript code containing multi-line comments or JSDocs.
  2. Format the code using the extension.
  3. Observe the addition of extra spaces in multi-line comments or strings.

Expected Behavior

The extension should format multi-line comments and JSDocs consistently without introducing extra spaces or new lines.

Actual Behavior

Extra lines are added each time the code is formatted, impacting the code's appearance.

Environment

  • Extension Version: 1.36.0
  • Formatter: ReScript (official) (Also happens when no code formatter is defined)
  • Visual Studio Code Version: 1.85.1
  • Operating System: X64 Windows 10.0.19045

Demonstration of Bug

image
Figure 1. Before Formatting ReScript code

image
Figure 2. After Formatting ReScript code once

image
Figure 3. After Formatting ReScript code twice

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