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

Ensure content is not added to unterminated strings #189

Open
jgardn3r opened this issue Mar 11, 2025 · 0 comments
Open

Ensure content is not added to unterminated strings #189

jgardn3r opened this issue Mar 11, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jgardn3r
Copy link
Collaborator

Currently, this:

A = 'a
+ b;

will be formatted like:

A = 'a + b;

While the code in this example is invalid, leaving the unterminated string alone as best as possible makes the most sense.
There are currently no guarantees for invalid code, but this seems to be a reasonable guarantee. The formatter strives to format valid code and provide a best-effort on invalid code minimising the damage where possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant