How it works
Each cleanup step runs as its own pass: line endings are normalized to LF first, then trailing whitespace, then repeated spaces if enabled, then runs of three or more blank lines are collapsed to one, and finally the whole document is trimmed.
Why line endings differ at all
Windows writes newlines as CRLF (\r\n), while Unix, Linux, and macOS use
LF (\n) alone. Mixed line endings in one file can confuse diff tools and
some editors, so normalizing to one style before pasting text elsewhere
avoids spurious changes.
What is left alone
Leading indentation is preserved, since removing it would break code and nested lists. Collapsing repeated spaces is off by default for the same reason — it is only safe for prose, not for anything indentation-sensitive.