Menu item should not match url if match_path is set #5643
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The menu item should not match the url if a match_path prevents this behavior. Previously the match_path method went truthy, if the url of the menu item started with the same url as the request regardless of the given match_path - configuration.
Example
The regex in the match_path of menu item 1 should highlight only if the url ends with "bar":
In the prevous implementation both menu items got highlighted, because they started with the same url. In the implemation of this Pull Request only the second menu item will be highlighted.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: