Remove Empty Lines
How This Converter Works
Removes blank lines, including lines containing whitespace, when a line-ending character follows them. Non-empty lines are retained.
Formula or rule
Output = input.replace(/^\s*[\r\n]/gm, '').
Example
- Input
- red
blue - Calculation
- The empty line between red and blue is removed.
- Result
- red
blue