Skip to content

Commit 76c918f

Browse files
update regex
Co-authored-by: fregante <me@fregante.com>
1 parent 2b82bad commit 76c918f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ TEST: addTests('isPRCommitList', [
276276
'https://github.com/sindresorhus/refined-github/pull/148/commits',
277277
]);
278278

279-
export const isPRFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/(files|(changes$|changes\/[\da-f]{7,40}..[\da-f]{7,40}$))/.test(getRepo(url)?.path) || isPRCommit(url);
279+
export const isPRFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/(files|(changes(\/[\da-f]{7,40}..[\da-f]{7,40})?$))/.test(getRepo(url)?.path) || isPRCommit(url);
280280
TEST: addTests('isPRFiles', [
281281
'isPRCommit', // File contents but lacks "Viewed" checkbox, has commit information
282282
'https://github.com/sindresorhus/refined-github/pull/148/files',

0 commit comments

Comments
 (0)