Fix loopProtect comment detection
parent
3a48daaa21
commit
4cc3d0e4a4
|
@ -72,7 +72,7 @@ if (typeof DEBUG === 'undefined') { DEBUG = true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j -= 1;
|
j -= 1;
|
||||||
} while (j !== 0);
|
} while (j >= 0);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ if (typeof DEBUG === 'undefined') { DEBUG = true; }
|
||||||
}
|
}
|
||||||
if (character === '/' || character === '*') {
|
if (character === '/' || character === '*') {
|
||||||
// looks like a comment, go back one to confirm or not
|
// looks like a comment, go back one to confirm or not
|
||||||
--index;
|
var prevCharacter = line.substr(index - 1, 1);
|
||||||
if (character === '/') {
|
if (prevCharacter === '/') {
|
||||||
// we've found a comment, so let's exit and ignore this line
|
// we've found a comment, so let's exit and ignore this line
|
||||||
DEBUG && debug('- exit: part of a comment'); // jshint ignore:line
|
DEBUG && debug('- exit: part of a comment'); // jshint ignore:line
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue