# File lib/generators/templates/application/merb_core/doc/rdoc/generators/merb_generator.rb, line 131
        def gen_url(url, text)
            if url =~ /([A-Za-z]+):(.*)/
                type = $1
                path = $2
            else
                type = "http"
                path = url
                url  = "http://#{url}"
            end

            if type == "link"
                url = path
            end

            if (type == "http" || type == "link") && url =~ /\.(gif|png|jpg|jpeg|bmp)$/
                "<img src=\"#{url}\">"
            elsif (type == "http" || type == "link")
                "<a href=\"#{url}\" target=\"_blank\">#{text}</a>"
            else
                "<a href=\"#\" onclick=\"jsHref('#{url}');\">#{text.sub(%r{^#{type}:/*}, '')}</a>"

            end
        end