diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-31 00:19:00 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-31 00:19:00 +0000 |
commit | 89b601d176a64f1293a3d3b5195b6735cbf880af (patch) | |
tree | c7f148e8cf8576202220ce567dc8b9a698e4b114 /lib/rdoc/markup/to_html.rb | |
parent | 4ac69a57b5e8587a321b052212ae5b9bedeafe55 (diff) | |
download | ruby-89b601d176a64f1293a3d3b5195b6735cbf880af.tar.gz |
* lib/rdoc: Update to RDoc 3.9. Fixed `ri []`, stopdoc creating an
object reference, nodoc for class aliases, verbatim === lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup/to_html.rb')
-rw-r--r-- | lib/rdoc/markup/to_html.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb index b518fbf265..f87aabad6f 100644 --- a/lib/rdoc/markup/to_html.rb +++ b/lib/rdoc/markup/to_html.rb @@ -70,7 +70,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter @list = nil @from_path = '' - # external hyperlinks + # external links @markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK) # and links of the form <text>[<url>] @@ -84,7 +84,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter # These methods handle special markup added by RDoc::Markup#add_special. ## - # +special+ is a potential hyperlink. The following schemes are handled: + # +special+ is a potential link. The following schemes are handled: # # <tt>mailto:</tt>:: # Inserted as-is. @@ -97,12 +97,13 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter def handle_special_HYPERLINK(special) url = special.text + gen_url url, url end ## - # This +special+ is a hyperlink where the label is different from the URL - # label[url] or {long label}[url] + # This +special+ is a link where the label is different from the URL + # <tt>label[url]</tt> or <tt>{long label}[url]</tt> def handle_special_TIDYLINK(special) text = special.text @@ -232,8 +233,8 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter end ## - # Generate a hyperlink for +url+, labeled with +text+. Handles the special - # cases for img: and link: described under handle_special_HYPERLINK + # Generate a link 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 |