Validate surrounding text before providing emmet completions in jsx/xml Fixes #47612

This commit is contained in:
Ramya Achutha Rao
2018-04-10 16:06:57 -07:00
parent 0940ea622f
commit e6b61067f2
2 changed files with 41 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
let rootNode: Stylesheet | undefined = undefined;
if (context.triggerKind !== vscode.CompletionTriggerKind.TriggerForIncompleteCompletions) {
validateLocation = syntax === 'html' || isStyleSheet(document.languageId);
validateLocation = syntax === 'html' || syntax === 'jsx' || syntax === 'xml' || isStyleSheet(document.languageId);
// If document can be css parsed, get currentNode
if (isStyleSheet(document.languageId)) {
let usePartialParsing = vscode.workspace.getConfiguration('emmet')['optimizeStylesheetParsing'] === true;