Skip to content

Commit

Permalink
style: adviced by kou
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jun 16, 2014
1 parent 97f2628 commit 2f617c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tdiary/style/wiki.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def to_html( string )
if /^(\d{4}|\d{6}|\d{8}|\d{8}-\d+)[^\d]*?#?([pct]\d+)?$/ =~ u then
%Q[<%=my '#{$1}#{$2}', '#{escape_quote k}' %>]
elsif /:/ =~ u
scheme = URI(u).scheme rescue nil # URI::InvalidURIError
scheme = URI( u ).scheme rescue nil # URI::InvalidURIError
if /\A(?:http|https|ftp|mailto)\z/ =~ scheme
u.sub!( /^\w+:/, '' ) if %r|://| !~ u and /^mailto:/ !~ u
%Q[<a href="#{u}">#{k}</a>]
Expand Down

0 comments on commit 2f617c2

Please sign in to comment.