Fix wrong condition for unterminated multi-line comments

This commit is contained in:
Mohamed Hegazy
2014-10-23 14:08:04 -07:00
parent 3c32fcc8df
commit b6f4aa9da9
2 changed files with 10 additions and 5 deletions

View File

@@ -2025,9 +2025,9 @@ module ts {
return true;
}
else {
// is unterminated multiline comment
return text.charCodeAt(comment.end - 1) !== CharacterCodes.slash &&
text.charCodeAt(comment.end - 2) !== CharacterCodes.asterisk;
// is unterminated multi-line comment
return !(text.charCodeAt(comment.end - 1) === CharacterCodes.slash &&
text.charCodeAt(comment.end - 2) === CharacterCodes.asterisk);
}
}
return false;