remove unused request_path_to_breadcrumb_display
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
@@ -192,10 +192,3 @@ def generate_parent_navs(path, pages_root: str):
|
||||
return generate_parent_navs(parent_resource_path, pages_root) + [(page_name, request_path)]
|
||||
except FileNotFoundError:
|
||||
return generate_parent_navs(parent_resource_path, pages_root) + [(request_path, request_path)]
|
||||
|
||||
|
||||
def request_path_to_breadcrumb_display(path):
|
||||
"""Given a request path, e.g. "/foo/bar/baz/", turn it into breadcrumby text "baz"."""
|
||||
undired = path.rstrip('/')
|
||||
leaf = undired[undired.rfind('/'):]
|
||||
return leaf.strip('/')
|
||||
|
||||
Reference in New Issue
Block a user