diff --git a/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts index d38adff72e190..643fea0a2d038 100644 --- a/extensions/emmet/src/abbreviationActions.ts +++ b/extensions/emmet/src/abbreviationActions.ts @@ -468,13 +468,13 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen && propertyNode.separator && offset >= propertyNode.separatorToken.end && offset <= propertyNode.terminatorToken.start - && abbreviation.indexOf(':') === -1) { + && !abbreviation.includes(':')) { return hexColorRegex.test(abbreviation) || abbreviation === '!'; } if (!propertyNode.terminatorToken && propertyNode.separator && offset >= propertyNode.separatorToken.end - && abbreviation.indexOf(':') === -1) { + && !abbreviation.includes(':')) { return hexColorRegex.test(abbreviation) || abbreviation === '!'; } if (hexColorRegex.test(abbreviation) || abbreviation === '!') {