File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/languageservice/services Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -691,8 +691,17 @@ export class YamlCompletion {
691691 } ) ;
692692 }
693693
694- const hasMatchingAlias = ( propSchema : JSONSchema ) : boolean => {
694+ const hasMatchingProperty = ( key : string , propSchema : JSONSchema ) : boolean => {
695695 return node . items . some ( ( pair ) => {
696+ if ( ! isScalar ( pair . key ) || typeof pair . key . value !== 'string' ) {
697+ return false ;
698+ }
699+
700+ const ignoreCase = shouldIgnoreCase ( propSchema , 'key' ) ;
701+ if ( ignoreCase && pair . key . value . toUpperCase ( ) === key . toUpperCase ( ) && pair . key . value !== key ) {
702+ return true ;
703+ }
704+
696705 if ( Array . isArray ( propSchema . aliases ) ) {
697706 return propSchema . aliases . some ( ( alias ) => {
698707 if ( ! isScalar ( pair . key ) || typeof pair . key . value !== 'string' ) {
@@ -749,7 +758,7 @@ export class YamlCompletion {
749758 typeof propertySchema === 'object' &&
750759 ! propertySchema . deprecationMessage &&
751760 ! propertySchema [ 'doNotSuggest' ] &&
752- ! hasMatchingAlias ( propertySchema )
761+ ! hasMatchingProperty ( key , propertySchema )
753762 ) {
754763 let identCompensation = '' ;
755764 if ( nodeParent && isSeq ( nodeParent ) && node . items . length <= 1 && ! hasOnlyWhitespace ) {
You can’t perform that action at this time.
0 commit comments