fix isDelimiter bug, add white space/newline support, add comment support