summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-02-10 15:55:30 +0100
committermguetlein <martin.guetlein@gmail.com>2011-02-10 15:55:30 +0100
commit85096197c1618cea45d7a1a8d5e4810ce1166083 (patch)
tree1170f32fa84ec85e9311cb8fac021f099df90355
parent616bb4b7aefed40cda0e09c88dc35ce1a82f8106 (diff)
render https as link
-rwxr-xr-xlib/to-html.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/to-html.rb b/lib/to-html.rb
index e9764ef..4de5ee6 100755
--- a/lib/to-html.rb
+++ b/lib/to-html.rb
@@ -7,7 +7,7 @@ class String
# encloses URI in text with with link tag
# @return [String] new text with marked links
def link_urls
- self.gsub(/(?i)http:\/\/[^\r\n\s']*/, '<a href=\0>\0</a>')
+ self.gsub(/(?i)http(s?):\/\/[^\r\n\s']*/, '<a href=\0>\0</a>')
end
end