Skip to content
Snippets Groups Projects
Commit bf7acd64 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[javascript-hint addon] Don't fire hints in comments or strings

parent 8c42f651
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@
function scriptHint(editor, keywords, getToken, options) {
// Find the token at the cursor
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;
if (/\b(?:string|comment)\b/.test(token.type)) return;
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
// If it's not a 'word-style' token, ignore the token.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment