Refine noise check on js variables in emmet

This commit is contained in:
Ramya Achutha Rao
2017-08-29 19:07:22 -07:00
parent 5769bebb3c
commit 93ec3c6f77

View File

@@ -44,7 +44,7 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
noiseCheckPromise = Promise.resolve(true);
} else {
noiseCheckPromise = vscode.commands.executeCommand('vscode.executeDocumentSymbolProvider', document.uri).then((symbols: vscode.SymbolInformation[]) => {
return symbols.find(x => abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation));
return symbols.find(x => abbreviation === x.name || (abbreviation.startsWith(x.name + '.') && !/>|\*|\+/.test(abbreviation)));
});
}
}