We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d56ffb2 commit a224178Copy full SHA for a224178
src/utils/documentIndex.ts
@@ -463,7 +463,7 @@ export function inferDocName(uri: vscode.Uri): string | undefined {
463
});
464
if (!containingPaths.size) return; // We couldn't learn anything from the documents in the index
465
// Sort the values in the Set by number of segments descending so we check the deepest paths first
466
- const containingPathsSorted = Array.from(containingPaths).sort((a, b) => b.split("/").length - a.split("/").length);
+ const containingPathsSorted = Array.from(containingPaths).sort((a, b) => b.length - a.length);
467
let result: string;
468
for (const prefix of containingPathsSorted) {
469
if (uri.path.startsWith(prefix)) {
0 commit comments