Don't provide hints in string literals

fixes issue #4050
This commit is contained in:
Erik Tierney committed 2013-06-05 14:09:10 -04:00
1 parent 149461a8ca
commit ba49afb6a1
2 files changed
+6

No files matched your search

@@ -84,6 +84,7 @@ define(function (require, exports, module) {
case "comment":
case "number":
case "regexp":
case "string":
// exclude variable & param decls
case "def":
return false;
@@ -365,6 +365,11 @@ define(function (require, exports, module) {
tearDownTest();
});
it("should not list hints in string literal", function () {
testEditor.setCursorPos({ line: 20, ch: 22 });
expectNoHints(JSCodeHints.jsHintProvider);
});
it("should list declared variable and function names in outer scope", function () {
testEditor.setCursorPos({ line: 6, ch: 0 });
var hintObj = expectHints(JSCodeHints.jsHintProvider);