I work with Notepad++
If text file contain lines with only spaces in it - I what to auto convert (shrink) it to empty line
For example:
File before (spaces are shown as . dots, end of the line a shown as [CR][LF])
some code[CR][LF]
some code[CR][LF]
...[CR][LF]
some sode[CR][LF]
File after
some code[CR][LF]
some code[CR][LF]
[CR][LF]
some sode[CR][LF]
In Macro -> 'Trim trailing space and save' workded for me. (Alt + Shift + S)