From 89b601d176a64f1293a3d3b5195b6735cbf880af Mon Sep 17 00:00:00 2001 From: drbrain Date: Sun, 31 Jul 2011 00:19:00 +0000 Subject: * 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 --- lib/rdoc/markup.rb | 62 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) (limited to 'lib/rdoc/markup.rb') diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb index 6122fcac65..3dd2459e61 100644 --- a/lib/rdoc/markup.rb +++ b/lib/rdoc/markup.rb @@ -269,40 +269,43 @@ require 'rdoc' # preceding the first character with a backslash (see Escaping # Text Markup, below). # -# === Hyperlinks +# === Links # -# Hyperlinks to the web starting with +http:+, +mailto:+, +ftp:+ or +www.+ +# Links to starting with +http:+, +https:+, +mailto:+, +ftp:+ or +www.+ # are recognized. An HTTP url that references an external image file is -# converted into an inline . Hyperlinks starting with +link:+ are -# assumed to refer to local files whose path is relative to the --op -# directory. +# converted into an inline image element. # -# Hyperlinks can also be of the form _label_[_url_], 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: {multi word label}[url]. +# Links starting with rdoc-ref: will link to the referenced class, +# module, method, file, etc. If the referenced item is not documented the +# text will be and no link will be generated. # -# Example hyperlinks: +# Links starting with +link:+ refer to local files whose path is relative to +# the --op directory. # -# link:RDoc.html -# http://rdoc.rubyforge.org +# Links can also be of the form label[url], 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: {multi word label}[url]. +# +# Example links: +# +# https://github.com/rdoc/rdoc # mailto:user@example.com # {RDoc Documentation}[http://rdoc.rubyforge.org] -# {RDoc Markup}[link:RDoc/Markup.html] +# {RDoc Markup}[rdoc-ref:RDoc::Markup] # # === Escaping Text Markup # # Text markup can be escaped with a backslash, as in \, which was obtained -# with "\\". Except in verbatim sections and between \ tags, -# to produce a backslash, you have to double it unless it is followed by a +# with \\. Except in verbatim sections and between \ tags, +# to produce a backslash you have to double it unless it is followed by a # space, tab or newline. Otherwise, the HTML formatter will discard it, as it -# is used to escape potential hyperlinks: +# is used to escape potential links: # # * The \ must be doubled if not followed by white space: \\. # * But not in \ tags: in a Regexp, \S matches non-space. # * This is a link to {ruby-lang}[www.ruby-lang.org]. # * This is not a link, however: \{ruby-lang.org}[www.ruby-lang.org]. -# * This will not be hyperlinked to \RDoc::RDoc#document +# * This will not be linked to \RDoc::RDoc#document # # generates: # @@ -310,16 +313,16 @@ require 'rdoc' # * But not in \ tags: in a Regexp, \S matches non-space. # * This is a link to {ruby-lang}[www.ruby-lang.org] # * This is not a link, however: \{ruby-lang.org}[www.ruby-lang.org] -# * This will not be hyperlinked to \RDoc::RDoc#document +# * This will not be linked to \RDoc::RDoc#document # -# Inside \ tags, more precisely, leading backslashes are removed -# only if followed by a markup character (<*_+), a backslash, -# or a known hyperlink reference (a known class or method). So in the -# example above, the backslash of \S would be removed -# if there was a class or module named +S+ in the current context. +# Inside \ tags, more precisely, leading backslashes are removed only if +# followed by a markup character (<*_+), a backslash, or a known link +# reference (a known class or method). So in the example above, the backslash +# of \S would be removed if there was a class or module named +S+ in +# the current context. # -# This behavior is inherited from RDoc version 1, and has been kept -# for compatibility with existing RDoc documentation. +# This behavior is inherited from RDoc version 1, and has been kept for +# compatibility with existing RDoc documentation. # # === Conversion of characters # @@ -378,11 +381,10 @@ require 'rdoc' # # ... # end # -# Names of classes, files, and any method names containing an -# underscore or preceded by a hash character are automatically hyperlinked -# from comment text to their description. This hyperlinking works inside -# the current class or module, and with ancestor methods (in included modules -# or in the superclass). +# Names of classes, files, and any method names containing an underscore or +# preceded by a hash character are automatically linked from comment text to +# their description. This linking works inside the current class or module, +# and with ancestor methods (in included modules or in the superclass). # # Method parameter lists are extracted and displayed with the method # description. If a method calls +yield+, then the parameters passed to yield -- cgit v1.2.3