diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-23 23:53:49 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-23 23:53:49 +0000 |
commit | 61920a128a2593f6fb968cfd4928499f0a3e2ed3 (patch) | |
tree | 603eb46008483ed97100d616b7f785bd86a14337 /lib/rdoc | |
parent | cede48fd403ddb0631fafc49392350bb889c38ab (diff) | |
download | ruby-61920a128a2593f6fb968cfd4928499f0a3e2ed3.tar.gz |
* lib/rdoc: Update to RDoc 3.9.3. Fixes RDoc with `ruby -Ku`. Allows
HTTPS image paths to be turned into <img> tags. Prevents special
markup inside <tt> from being processed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/encoding.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/markup.rb | 14 | ||||
-rw-r--r-- | lib/rdoc/markup/formatter.rb | 4 | ||||
-rw-r--r-- | lib/rdoc/markup/to_html.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/ruby_lex.rb | 2 |
5 files changed, 21 insertions, 3 deletions
diff --git a/lib/rdoc/encoding.rb b/lib/rdoc/encoding.rb index cfe1ba7725..813d5ea6fa 100644 --- a/lib/rdoc/encoding.rb +++ b/lib/rdoc/encoding.rb @@ -1,3 +1,5 @@ +# coding: US-ASCII + require 'rdoc' ## diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb index 3dd2459e61..616d6e34f3 100644 --- a/lib/rdoc/markup.rb +++ b/lib/rdoc/markup.rb @@ -284,7 +284,19 @@ require 'rdoc' # # Links can also be of the form <tt>label[url]</tt>, in which case +label+ is # used in the displayed text, and +url+ is used as the target. If +label+ -# contains multiple words, put it in braces: <tt>{multi word label}[url]<tt>. +# contains multiple words, put it in braces: <tt>{multi word label}[url]</tt>. +# The +url+ may be an +http:+-type link or a cross-reference to a class, +# module or method with a label. +# +# Links with the <tt>rdoc-ref:</tt> scheme will link to the referenced class, +# module, method, file, etc. If the referenced item is does not exist +# no link will be generated and <tt>rdoc-ref:</tt> will be removed from the +# resulting text. +# +# Links starting with +link:+ refer to local files whose path is relative to +# the <tt>--op</tt> directory. Use <tt>rdoc-ref:</tt> instead of +# <tt>link:</tt> to link to files generated by RDoc as the link target may +# be different across RDoc generators. # # Example links: # diff --git a/lib/rdoc/markup/formatter.rb b/lib/rdoc/markup/formatter.rb index bf904bba68..f42b3fc6ea 100644 --- a/lib/rdoc/markup/formatter.rb +++ b/lib/rdoc/markup/formatter.rb @@ -88,7 +88,9 @@ class RDoc::Markup::Formatter ## # Converts added specials. See RDoc::Markup#add_special - def convert_special(special) + def convert_special special + return special.text if in_tt? + handled = false RDoc::Markup::Attribute.each_name_of special.type do |name| diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb index ca6522352d..bd5fdb493e 100644 --- a/lib/rdoc/markup/to_html.rb +++ b/lib/rdoc/markup/to_html.rb @@ -254,7 +254,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter end end - if (type == "http" or type == "link") and + if (type == "http" or type == "https" or type == "link") and url =~ /\.(gif|png|jpg|jpeg|bmp)$/ then "<img src=\"#{url}\" />" else diff --git a/lib/rdoc/ruby_lex.rb b/lib/rdoc/ruby_lex.rb index 13e86728c9..4392cea9cf 100644 --- a/lib/rdoc/ruby_lex.rb +++ b/lib/rdoc/ruby_lex.rb @@ -1,3 +1,5 @@ +# coding: US-ASCII + #-- # irb/ruby-lex.rb - ruby lexcal analyzer # $Release Version: 0.9.5$ |