replace newlines in the text with spaces instead of nothing