changed the rule for appending newlines in text, one newline is appended for every newline (not just one), seems more consistently useful
simplified the white space collapsing code