Generate a link to url with content text. Handles the
special cases for img: and link: described under handle_special_HYPERLINK
# File lib/rdoc/markup/to_html.rb, line 314
def gen_url url, text
scheme, url, id = parse_url url
if ]http https link].include?(scheme) and
url =~ /\.(gif|png|jpg|jpeg|bmp)$/ then
"<img src=\"#{url}\" />"
else
text = text.sub %^#{scheme}:/*%, ''
text = text.sub %^[*\^](\d+)$%, '\1'
link = "<a#{id} href=\"#{url}\">#{text}</a>"
link = "<sup>#{link}</sup>" if /"foot/ =~ id
link
end
end