Replace the new lines in plain math with spaces.