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;

View File

@ -10,6 +10,8 @@
//// {| "name": "5" |}/* */
/////* {| "name": "6" |}
goTo.marker("1");
verify.completionListIsEmpty();
@ -22,5 +24,8 @@ verify.completionListIsEmpty();
goTo.marker("4");
verify.not.completionListIsEmpty();
//goTo.marker("5");
//verify.not.completionListIsEmpty();
goTo.marker("5");
verify.not.completionListIsEmpty();
goTo.marker("6");
verify.completionListIsEmpty();