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

Option to disable the removing of trailing spaces #631

Open
Avol-V opened this issue May 2, 2024 · 0 comments
Open

Option to disable the removing of trailing spaces #631

Avol-V opened this issue May 2, 2024 · 0 comments

Comments

@Avol-V
Copy link

Avol-V commented May 2, 2024

Currently there is no way to preserve trailing spaces, even when it's needed.

Maybe we need to preserve spaces in comments (for example, is a break line in markdown):

 /**
-·*·Some··
+·*·Some
 ·*·markdown
 ·*/

Or we want to preserve indentation level of the block:

 if·(·some·)
 {
 →some();
-→
+
 →return;
 }

In both cases dprint currently removes spaces, as you can see in difs.

It would be good if we could preserve user formatting here.
Or it can be more flexible solution with settings for trimming spaces with different situations (in empty line, in comment, in the end of the code lines).

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