Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Wildcard matching should be used in help file search #3967

Copy link
Copy link
@lzybkr

Description

@lzybkr
Issue body actions

In #3852 - the change treats the parameter like a wildcard, but uses a regex. Also, the fix repeatedly checks (inside the loop) if it's a pattern, that can be done once.

I would have expected a fix more like:

            var wildcardPattern = WildcardPattern.ContainsWildcardCharacters(pattern)
                ? WildcardPatter.Get(pattern, WildcardOptions.IgnoreCase)
                : null;

            foreach (string filePath in files)
            {
                if (filePath.IndexOf(pattern, StringComparison.OrdinalIgnoreCase) >= 0)
                {
                    result.Add(filePath);
                    break;
                }

                if (wildcardPattern.?IsMatch(pattern))
                {             
                    result.Add(filePath);
                }
            }
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.