From c526442ad8f9fddc1b99c0309cfdfbb05a9b582f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 4 Jan 2019 13:46:50 +0000 Subject: linkify source commands and URLs It's common to have gitweb and cgit URLs which are viewable in the browser AND clonable. So add links to encourage follows. --- lib/oldweb/_tail.rhtml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/oldweb/_tail.rhtml b/lib/oldweb/_tail.rhtml index 14fc5a8..e3fada5 100644 --- a/lib/oldweb/_tail.rhtml +++ b/lib/oldweb/_tail.rhtml @@ -22,8 +22,11 @@ href="mailto:<%= private_email %>"><%= private_email %><% end if url_or_cmd = source_code.shift + url_or_cmd = url_or_cmd.sub(%r{\b(https?://\S+)}, "\\1") %> source code: <%= url_or_cmd %> -<% source_code.each do |x| %><%= "\t#{x}" %><% end +<% source_code.each do |x| %><%= + %Q{\t#{x.sub(%r{\b(https?://\S+)}, %Q{\\1})}} +%><% end end %><% end %> -- cgit v1.2.3-24-ge0c7