fix: 修复错误的 URL 正则表达式

This commit is contained in:
Chuck
2022-06-02 23:12:54 +08:00
committed by GitHub
parent e3e14b8259
commit 71be58fc1f

View File

@@ -211,5 +211,5 @@ export function lighten(color: string, amount: number) {
* 判断是否 url
* */
export function isUrl(url: string) {
return /(^http|https:\/\/)/g.test(url);
return /^(http|https):\/\//g.test(url);
}