From e5c5783701ce9677f7caac620c7fe97e4d16f383 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Tue, 25 Dec 2012 09:20:59 +0000 Subject: [PATCH] More concise code for recipe source URL --- html/index.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/html/index.erb b/html/index.erb index 93e0d728..858847ee 100644 --- a/html/index.erb +++ b/html/index.erb @@ -28,11 +28,11 @@ descr, source = $1, $3 end - case source - when 'github' then source_url = "https://github.com/#{recipe['repo']}" - when 'wiki' then source_url = recipe.key?('files') ? nil : "http://www.emacswiki.org/emacs/#{pkgname}.el" - else source_url = nil - end + source_url = + case source + when 'github' then "https://github.com/#{recipe['repo']}" + when 'wiki' then recipe.key?('files') ? nil : "http://www.emacswiki.org/emacs/#{pkgname}.el" + end ["[#{pkgname}](#{pkgurl})", version, descr, "[recipe](#{recipe_url})", source_url ? "[#{source}](#{source_url})" : ""] end