Skip to content

Commit

Permalink
Use isNewLine in skipLineComment
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed May 13, 2017
1 parent 381657d commit b5e41ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tokenize.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ pp.skipLineComment = function(startSkip) {
let start = this.pos
let startLoc = this.options.onComment && this.curPosition()
let ch = this.input.charCodeAt(this.pos += startSkip)
while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
++this.pos
ch = this.input.charCodeAt(this.pos)
while (this.pos < this.input.length && !isNewLine(ch)) {
ch = this.input.charCodeAt(++this.pos)
}
if (this.options.onComment)
this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
Expand Down

0 comments on commit b5e41ef

Please sign in to comment.