We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccc3ef9 commit 1f8f34bCopy full SHA for 1f8f34b
menu_generator/menu.py
@@ -91,14 +91,14 @@ def _is_selected(self, item_dict):
91
If related URLS are given, it also returns true if one of the related URLS is part of path.
92
"""
93
url = self._get_url(item_dict)
94
- if self._is_root(item_dict) and url in self.path:
+ if self._is_root(item_dict) and self.path.startswith(url):
95
return True
96
elif url == self.path:
97
98
else:
99
# Go through all related URLs and test
100
for related_url in self._get_related_urls(item_dict):
101
- if related_url in self.path:
+ if self.path.startswith(related_url):
102
103
return False
104
0 commit comments