fix: gist not support username contains numbers (#1622)
This commit is contained in:
committed by
GitHub
parent
1b6a986986
commit
fdaa36c9fd
@@ -2,7 +2,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
const URL_REGEX = new RegExp(
|
||||
"^https://gist.github.com/([a-zd](?:[a-zd]|-(?=[a-zd])){0,38})/(.*)$"
|
||||
"^https://gist.github.com/([a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38})/(.*)$"
|
||||
);
|
||||
|
||||
type Props = {|
|
||||
|
||||
@@ -9,6 +9,12 @@ describe("Gist", () => {
|
||||
match
|
||||
)
|
||||
).toBeTruthy();
|
||||
|
||||
expect(
|
||||
"https://gist.github.com/n3n/eb51ada6308b539d388c8ff97711adfa".match(
|
||||
match
|
||||
)
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
test("to not be enabled elsewhere", () => {
|
||||
|
||||
Reference in New Issue
Block a user