Skip to content

Commit

Permalink
Merge branch 'master' of github.com:vovikhangcdv/parse-url into new-v…
Browse files Browse the repository at this point in the history
…ersion
  • Loading branch information
IonicaBizau committed Jul 25, 2022
2 parents e3af0c7 + 3c169ee commit 5303d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -37,7 +37,7 @@ import normalizeUrl from "normalize-url";
const parseUrl = (url, normalize = false) => {

// Constants
const GIT_RE = /((git@|http(s)?:\/\/)([\w\.@]+)(\/|:))(([\~,\w,\-,\_,\/]+)(.git){0,1}((\/){0,1}))/
const GIT_RE = /(^(git@|http(s)?:\/\/)([\w\.@]+)(\/|:))(([\~,\w,\-,\_,\/]+)(.git){0,1}((\/){0,1}))/

if (typeof url !== "string" || !url.trim()) {
const err = new Error("Invalid url.")
Expand Down

0 comments on commit 5303d3f

Please sign in to comment.