mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Use includes instead of indexOf (#167608)
Tests microsoft/vscode-pull-request-github#4257
This commit is contained in:
parent
7b20bd008e
commit
096f4de76e
|
@ -468,13 +468,13 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen
|
||||||
&& propertyNode.separator
|
&& propertyNode.separator
|
||||||
&& offset >= propertyNode.separatorToken.end
|
&& offset >= propertyNode.separatorToken.end
|
||||||
&& offset <= propertyNode.terminatorToken.start
|
&& offset <= propertyNode.terminatorToken.start
|
||||||
&& abbreviation.indexOf(':') === -1) {
|
&& !abbreviation.includes(':')) {
|
||||||
return hexColorRegex.test(abbreviation) || abbreviation === '!';
|
return hexColorRegex.test(abbreviation) || abbreviation === '!';
|
||||||
}
|
}
|
||||||
if (!propertyNode.terminatorToken
|
if (!propertyNode.terminatorToken
|
||||||
&& propertyNode.separator
|
&& propertyNode.separator
|
||||||
&& offset >= propertyNode.separatorToken.end
|
&& offset >= propertyNode.separatorToken.end
|
||||||
&& abbreviation.indexOf(':') === -1) {
|
&& !abbreviation.includes(':')) {
|
||||||
return hexColorRegex.test(abbreviation) || abbreviation === '!';
|
return hexColorRegex.test(abbreviation) || abbreviation === '!';
|
||||||
}
|
}
|
||||||
if (hexColorRegex.test(abbreviation) || abbreviation === '!') {
|
if (hexColorRegex.test(abbreviation) || abbreviation === '!') {
|
||||||
|
|
Loading…
Reference in a new issue