mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RDoc 3.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
90d5bcf910
commit
e2efe8e81d
28 changed files with 494 additions and 56 deletions
|
@ -26,6 +26,11 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
|
|||
attr_reader :in_list_entry # :nodoc:
|
||||
attr_reader :list # :nodoc:
|
||||
|
||||
##
|
||||
# Path to this document for relative links
|
||||
|
||||
attr_accessor :from_path
|
||||
|
||||
##
|
||||
# Converts a target url to one that is relative to a given path
|
||||
|
||||
|
@ -59,6 +64,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
|
|||
@th = nil
|
||||
@in_list_entry = nil
|
||||
@list = nil
|
||||
@from_path = ''
|
||||
|
||||
# external hyperlinks
|
||||
@markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK)
|
||||
|
@ -79,8 +85,8 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
|
|||
end
|
||||
|
||||
##
|
||||
# Generate a hyperlink for url, labeled with text. Handle the
|
||||
# special cases for img: and link: described under handle_special_HYPERLINK
|
||||
# Generate a hyperlink for +url+, labeled with +text+. Handles the special
|
||||
# cases for img: and link: described under handle_special_HYPERLINK
|
||||
|
||||
def gen_url(url, text)
|
||||
if url =~ /([A-Za-z]+):(.*)/ then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue