We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9400d52 commit abf95a7Copy full SHA for abf95a7
web_src/js/features/repo-view-file-tree-sidebar.ts
@@ -111,12 +111,12 @@ function extractPath(url) {
111
const path = urlObj.pathname;
112
113
// Define a regular expression to match "/{param1}/{param2}/src/{branch}/{main}/"
114
- const regex = /^\/[^\/]+\/[^\/]+\/src\/[^\/]+\/[^\/]+\//;
+ const regex = /^\/[^/]+\/[^/]+\/src\/[^/]+\/[^/]+\//;
115
116
// Use RegExp#exec() method to match the path
117
const match = regex.exec(path);
118
if (match) {
119
- return path.substring(match[0].length);
+ return path.substring(match[0].length);
120
}
121
122
// If the path does not match, return the original path
0 commit comments