Don't return an empty row at the end if the last character is a newline