Remove newlines at the ends of snippets.