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 554602a commit afc0f8aCopy full SHA for afc0f8a
src/lib/paths.ts
@@ -7,6 +7,7 @@ import * as path from "path";
7
import { ROOT } from "../lib/constants";
8
import { MoveOrRename, SplitPathResult } from "./paths.d";
9
10
+const REPEAT_PATH_STARTS = ["readme", "index"];
11
/**
12
* Get metadata for a given path.
13
*
@@ -42,8 +43,11 @@ export function friendlyFile(filePath: string) {
42
43
const { name } = splitPath(filePath);
44
45
const nameLower = name.toLowerCase();
- if (nameLower.startsWith("readme") || nameLower.startsWith("index")) {
46
- return filePath;
+
47
+ for (const p of REPEAT_PATH_STARTS) {
48
+ if (nameLower.startsWith(p)) {
49
+ return filePath;
50
+ }
51
}
52
return name;
53
0 commit comments