Remove empty lines

Automatically remove empty lines and lines containing only spaces from a text.