-
Notifications
You must be signed in to change notification settings - Fork 161
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
trim trailing whitespace? #5689
Comments
These editor settings are specified in |
I had expected a lot of trailing blanks in examples inside .gd files, because GAP output contains a lot of them. If trailing blanks are so unpopular then wouldn't it be more logical to change GAP such that they are not produced anymore, instead of removing them afterwards, and changing the test setup to ignore them in comparisons? |
Changing GAP to avoid these trailing whitespace is difficult because it lacks required information internally to make it easy -- computing in advance where a line break will be is difficult the way things are set up in the kernel. We'd have to do odd tricks like "delay printing of all whitespace until a non-whitespace is printed". This sounds extremely error prone and difficult to me. At the same time, it sounds like a solution for a problem nobody has? It seems to me the current state works reasonably well? |
One thing I'd be happy to do is switch |
Concerning "a solution for a problem nobody has": One can call |
To be concrete, my suggestion is to add a new I'm happy to write the PR for that, but obviously it's no good if people don't want it. |
Today I stumbled over a problem due to #5312.
When I saved the file
doc/ref/mloop.xml
, three trailing blanks got removed automatically.(
git restore
seemed to be the only way to get the original contents back.)Logically, these blanks are needed.
Technically, it does not matter because the GAP session in question is not part of tests.
Is it really a good idea to remove trailing whitespace automatically whenever a file gets saved?
The text was updated successfully, but these errors were encountered: