We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b4b880 + fee0d8e commit 0c7f3daCopy full SHA for 0c7f3da
assets/js/app.coffee
@@ -112,14 +112,9 @@ class LicenseSuggestion
112
113
# Try to extract the repository full name from the user input
114
parseUserInput: (userInput) ->
115
- repository = /https?:\/\/github\.com\/(.*?)\/(.+)(\.git)?$/.exec userInput
+ repository = /https?:\/\/github\.com\/([^\/]+)\/([^\/\?#]+)/.exec userInput
116
[_, username, project] = repository
117
- project = project
118
- .split /\/|\.git/
119
- .filter (str) -> str
120
- .slice 0, 1
121
- .join ""
122
- return username + '/' + project
+ return username + '/' + project.replace /(\.git)$/, ''
123
124
# Displays an indicator and tooltips to the user about the current status
125
setStatus: (status="", message="") =>
0 commit comments