We can just add `chomp` here instead of doing `s/\R//g;` at the bottom.