Skip to content

Instantly share code, notes, and snippets.

@tdl
Created May 13, 2011 19:32
Show Gist options
  • Save tdl/971159 to your computer and use it in GitHub Desktop.
Save tdl/971159 to your computer and use it in GitHub Desktop.
Remove doubled empty lines
def remove_doubled_empty_lines(s)
s.squeeze("\r\n").gsub(/(\r\n)+/, "\r\n")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment