Skip to content

Commit 3336a26

Browse files
ro-savageCompuIves
authored andcommitted
Update github regex for names containing a dash (codesandbox#542)
Update github regex for names containing a dash
1 parent e0c9ce7 commit 3336a26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/common/utils/url-generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
import type { Sandbox } from 'common/types';
33

4-
export const gitHubRepoPattern = /(https?:\/\/)?((www.)?)github.com(\/\w+){2,}/;
4+
export const gitHubRepoPattern = /(https?:\/\/)?((www.)?)github.com(\/[\w-]+){2,}/;
55
const gitHubPrefix = /(https?:\/\/)?((www.)?)github.com/;
66
const dotGit = /(\.git)$/;
77

0 commit comments

Comments
 (0)