# File lib/action_view/helpers/text_helper.rb, line 301
      def auto_link(text, *args, &block)#link = :all, html = {}, &block)
        return ''.html_safe if text.blank?

        options = args.size == 2 ? {} : args.extract_options! # this is necessary because the old auto_link API has a Hash as its last parameter
        unless args.empty?
          options[:link] = args[0] || :all
          options[:html] = args[1] || {}
        end
        options.reverse_merge!(:link => :all, :html => {})

        case options[:link].to_sym
          when :all                         then auto_link_email_addresses(auto_link_urls(text, options[:html], options, &block), options[:html], &block)
          when :email_addresses             then auto_link_email_addresses(text, options[:html], &block)
          when :urls                        then auto_link_urls(text, options[:html], options, &block)
        end
      end