Changeset View
Changeset View
Standalone View
Standalone View
swh/web/browse/views/content.py
Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | if mimetype and "text/" in mimetype: | ||||
available_languages = highlightjs.get_supported_languages() | available_languages = highlightjs.get_supported_languages() | ||||
root_dir = None | root_dir = None | ||||
filename = None | filename = None | ||||
path_info = None | path_info = None | ||||
directory_id = None | directory_id = None | ||||
directory_url = None | directory_url = None | ||||
query_params = {"origin": origin_url} | query_params = {"origin_url": origin_url} | ||||
breadcrumbs = [] | breadcrumbs = [] | ||||
if path: | if path: | ||||
split_path = path.split("/") | split_path = path.split("/") | ||||
root_dir = split_path[0] | root_dir = split_path[0] | ||||
filename = split_path[-1] | filename = split_path[-1] | ||||
if root_dir != path: | if root_dir != path: | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |