-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve pattern matching when user is likely providing camel humps #75757
Improve pattern matching when user is likely providing camel humps #75757
Conversation
comparison = (!this.IsCaseSensitive).CompareTo(!other.IsCaseSensitive); | ||
if (comparison != 0) | ||
return comparison; | ||
switch (this.IsCaseSensitive, other.IsCaseSensitive) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as before. just clearer imo.
@@ -170,15 +182,31 @@ private static bool ContainsUpperCaseLetter(string pattern) | |||
} | |||
else | |||
{ | |||
var isCaseSensitive = _compareInfo.IsPrefix(candidate, patternChunk.Text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isPrefix
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. This is stating if it's case sensitive or not. if it's a prefix that it is, otherwise it isn't and it must have been case inseisitive.
// See if we can find a camel case match. | ||
if (candidateHumps.Count == 0) | ||
StringBreaker.AddWordParts(candidate, ref candidateHumps.AsRef()); | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code block looks a bit confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what to do about that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #17275