- //FIXME: title
- $this->arGitUrls[][] = 'git://gist.github.com/'
- . ltrim($arUrl['path'], '/') . '.git';
+ //https://gist.github.com/cweiske/2400389
+ // clone URL: https://gist.github.com/2400389.git
+ $parts = explode('/', ltrim($arUrl['path'], '/'));
+ if (count($parts == 2)) {
+ //we only want the number, not the user name
+ $path = $parts[1];
+ } else {
+ $path = ltrim($arUrl['path'], '/');
+ }
+ $title = $this->getHtmlTitle($url);
+ if ($title === null) {
+ $this->arGitUrls[][] = 'https://gist.github.com/'
+ . $path . '.git';
+ } else {
+ $this->arGitUrls[$title][] = 'https://gist.github.com/'
+ . $path . '.git';
+ }