Skip to content

Conversation

@sandersn
Copy link
Member

@sandersn sandersn commented Dec 4, 2018

Broken by #27978, which removed the fallback. Before that change, if formatting processed no ranges, then trimTrailingWhitespacesForRemainingRange would instead use the original range. During the development of #27978, I thought it was necessary to instead skip trimming when no ranges were processed. This turns out to be wrong, so this PR reinstates the original behaviour.

Fixes #28781

@sandersn sandersn changed the title Revert over-eager bailout when trailing whitespace Revert over-eager bailout when trimming trailing whitespace Dec 4, 2018
@sandersn sandersn merged commit ee987a2 into master Dec 4, 2018
@sandersn sandersn deleted the fix-format-trailing-whitespace branch December 4, 2018 20:45
@sandersn
Copy link
Member Author

sandersn commented Dec 4, 2018

I also ported this to 3.2 since it should ship with the version of 3.2 that ships with VS.

Copy link
Contributor

@jessetrinity jessetrinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discovering test is green.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants