lib/mud.rb
# Convert urls to links and shorten the text, purely for making the html look nicer.
Convert urls to links and shorten the text, purely for making the html look nicer.
Convert urls to links and shorten the text purely for making the html look nicer .
def linkify(str)
			str.gsub( %r{http://[^"\s]+} ) do |url|
				short = url.gsub(%r{^.*#{Regexp.quote(request.host_with_port)}}, '')
    		"<a href='#{url}'>#{short}</a>"
			end
	end
def linkify ( str ) str . gsub ( %r{ http://[^" \s ]+ } ) do | url | short = url . gsub ( %r{ ^.* #{ Regexp . quote ( request . host_with_port ) } } , '' ) "<a href='#{url}'>#{short}</a>" end end
Convert urls to links and shorten the text, purely for making the html look nicer.
Convert urls to links and shorten the text purely for making the html look nicer .
str