Remove blank lines
Deletes empty and whitespace-only lines, or squeezes consecutive blank lines into one.
Example
- Options used
- ModeSqueeze consecutive blank lines into one
Input
Line 1 ··· Line 2 Line 3
Output
Line 1 Line 2 Line 3
Symbols in examples: ⇥ tab · · trailing space · ⍽ NBSP · □ full-width space · ◌ zero-width character
Open this operation in the toolWhat it does
Handles lines that contain no characters. Lines containing only spaces, tabs, NBSP or full-width spaces also count as blank. This avoids the common problem of a line that looks empty but will not go away because whitespace is still hiding in it.
Options
- Remove all blank lines: deletes every blank line so only lines with content remain. Suited to name lists, keyword lists and data with one value per line.
- Squeeze consecutive blank lines into one: shrinks two or more consecutive blank lines to one and removes blank lines at the very start and end of the text. Use it when you want to keep paragraph breaks and only get rid of excess spacing.
When to use it
Copying from a web page or email brings in blank lines at irregular intervals. Blank lines in list data throw off the numbers from Number lines or pile up at the top after Sort, so put this step before sorting and numbering.
Using 'Remove all' on text made of paragraphs erases the paragraph boundaries. For prose, use 'Squeeze into one'.