HTML list: link directly to more sources

This commit is contained in:
Steve Purcell 2013-04-16 21:05:27 +01:00
parent cb627617da
commit b04d439979

View file

@ -22,9 +22,13 @@
case package.source case package.source
when 'github' then recipe['repo'].include?('/') ? "https://github.com/#{recipe['repo']}" : "https://gist.github.com/#{recipe['repo']}" when 'github' then recipe['repo'].include?('/') ? "https://github.com/#{recipe['repo']}" : "https://gist.github.com/#{recipe['repo']}"
when 'wiki' then recipe.key?('files') ? nil : "http://www.emacswiki.org/emacs/#{package.name}.el" when 'wiki' then recipe.key?('files') ? nil : "http://www.emacswiki.org/emacs/#{package.name}.el"
when 'hg' then else
if recipe['url'] =~ /(bitbucket\.org\/[^\/]+\/[^\/\?]+)/ case recipe['url']
"https://" + $1 when /(bitbucket\.org\/[^\/]+\/[^\/\?]+)/ then "https://" + $1
when /(gitorious\.org\/[^\/]+\/[^.]+)/ then "https://" + $1
when /\A(https?:\/\/code\.google\.com\/p\/[^\/]+\/)/ then $1
when /\A(https?:\/\/[^.]+\.googlecode\.com\/)/ then $1
when /\Alp:(.*)/)/ then "https://launchpad.net/" + $1
end end
end end
package package