Skip to content

Commit 2d50f4e

Browse files
fix
1 parent 0633d1f commit 2d50f4e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/web/src/features/search/fileSourceApi.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { search } from "./searchApi";
66
import { sew } from "@/actions";
77
import { withOptionalAuthV2 } from "@/withAuthV2";
88
import { QueryIR } from './ir';
9+
910
// @todo (bkellam) #574 : We should really be using `git show <hash>:<path>` to fetch file contents here.
1011
// This will allow us to support permalinks to files at a specific revision that may not be indexed
1112
// by zoekt. We should also refactor this out of the /search folder.
@@ -21,12 +22,12 @@ export const getFileSource = async ({ fileName, repository, branch }: FileSource
2122
},
2223
},
2324
{
24-
regexp: {
25-
regexp: fileName,
25+
substring: {
26+
pattern: fileName,
2627
case_sensitive: true,
2728
file_name: true,
28-
content: false
29-
},
29+
content: false,
30+
}
3031
},
3132
...(branch ? [{
3233
branch: {

0 commit comments

Comments
 (0)