Skip to content

Commit 676dc1c

Browse files
Merge pull request #606 from screamerbg/f/git-regex-url
Fix Git URL regex so it doesn't match Windows paths
2 parents 437ac2e + bf63845 commit 676dc1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mbed/mbed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
regex_url_ref = r'^(.*/([\w.+-]+)(?:\.\w+)?)/?(?:#(.*))?$'
106106

107107
# git url (no #rev)
108-
regex_git_url = r'^(git\://|ssh\://|https?\://|)(([^/:@]+)(\:([^/:@]+))?@)?([^/:]+)[:/](.+?)(\.git|\/?)$'
108+
regex_git_url = r'^(git\://|ssh\://|https?\://|)(([^/:@]+)(\:([^/:@]+))?@)?([^/:]{3,})[:/](.+?)(\.git|\/?)$'
109109
# hg url (no #rev)
110110
regex_hg_url = r'^(file|ssh|https?)://([^/:]+)/([^/]+)/?([^/]+?)?$'
111111

0 commit comments

Comments
 (0)