diff options
-rw-r--r-- | lib/oldweb/_tail.rhtml | 5 |
1 files changed, 4 insertions, 1 deletions
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 %></a><% end if url_or_cmd = source_code.shift + url_or_cmd = url_or_cmd.sub(%r{\b(https?://\S+)}, "<a\nhref='\\1'>\\1</a>") %> 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{<a\nhref='\\1'>\\1</a>})}} +%><% end end %></pre><% end %> |