Guide
whitespace in text and code
A practical TinyDevTools guide.
Whitespace is contextual
Whitespace can separate tokens, represent indentation, align text, or simply be accidental formatting.
Three different operations
- Trim: remove leading and trailing whitespace from each line.
- Remove empty lines: remove lines whose visible content is empty while leaving meaningful-line formatting alone.
- Exact comparison: treat whitespace as part of the line when finding or removing duplicates.
A safe workflow
Inspect first, normalize only what you intend to normalize, then deduplicate or sort. This prevents a formatting cleanup from silently changing source semantics.