Improve detection of new lines and comments.