mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +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
|
||||
&& 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 === '!') {
|
||||
|
|
Loading…
Reference in a new issue