mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 19:17:27 +00:00
More concise code for recipe source URL
This commit is contained in:
parent
39de7629d7
commit
e5c5783701
1 changed files with 5 additions and 5 deletions
|
@ -28,10 +28,10 @@
|
||||||
descr, source = $1, $3
|
descr, source = $1, $3
|
||||||
end
|
end
|
||||||
|
|
||||||
|
source_url =
|
||||||
case source
|
case source
|
||||||
when 'github' then source_url = "https://github.com/#{recipe['repo']}"
|
when 'github' then "https://github.com/#{recipe['repo']}"
|
||||||
when 'wiki' then source_url = recipe.key?('files') ? nil : "http://www.emacswiki.org/emacs/#{pkgname}.el"
|
when 'wiki' then recipe.key?('files') ? nil : "http://www.emacswiki.org/emacs/#{pkgname}.el"
|
||||||
else source_url = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
["<a name=\"#{pkgname}\"></a>[#{pkgname}](#{pkgurl})", version, descr, "[recipe](#{recipe_url})", source_url ? "[#{source}](#{source_url})" : ""]
|
["<a name=\"#{pkgname}\"></a>[#{pkgname}](#{pkgurl})", version, descr, "[recipe](#{recipe_url})", source_url ? "[#{source}](#{source_url})" : ""]
|
||||||
|
|
Loading…
Reference in a new issue