Skip to content

Commit c4d9be2

Browse files
Now split on any amount of whitespace
1 parent 091e7b4 commit c4d9be2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

compiled/helpers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function getAllCodeowners(fileContents) {
5858
return !line.startsWith("#") && line.length > 0;
5959
})
6060
.map((line) => {
61-
const [_path, ...owners] = line.split(" ");
61+
const [_path, ...owners] = line.trim().split(/\s+/);
62+
console.log(_path, owners);
6263
return owners;
6364
})
6465
.flat();

src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function getAllCodeowners(fileContents: FileContentMapping[]): string[] {
3838
return !line.startsWith("#") && line.length > 0;
3939
})
4040
.map((line) => {
41-
const [_path, ...owners] = line.split(" ");
41+
const [_path, ...owners] = line.trim().split(/\s+/);
4242
return owners;
4343
})
4444
.flat();

0 commit comments

Comments
 (0)