fix(repository): un-component-uri-encode the filename in RepositoryTreeViewelse it would mess with folder paths including a /
@@ -42,12 +42,12 @@ const RepositoryTreeView: ReactIsland<
currentPath === "/"
? `/${orgSlug}/${repoSlug}/${encodeURIComponent(
currentRef
- )}/tree/${encodeURIComponent(fileName)}`
+ )}/tree/${fileName}`
: `/${orgSlug}/${repoSlug}/${encodeURIComponent(currentRef)}/tree/${
currentPath.endsWith("/") || currentPath === ""
? currentPath
: `${currentPath}/`
- }${encodeURIComponent(fileName)}`,
+ }${fileName}`,
};
},
[orgSlug, repoSlug, currentPath]
@@ -96,9 +96,7 @@ const RepositoryTreeView: ReactIsland<
.join("/")}/" folder`}
href={`/${orgSlug}/${repoSlug}/${encodeURIComponent(
currentRef
- )}/tree/${encodeURIComponent(
- currPathParts.slice(0, idx + 1).join("/")
- )}/`}
+ )}/tree/${currPathParts.slice(0, idx + 1).join("/")}/`}
>
<TextEllipsis>{pathPart}/</TextEllipsis>
</a>