[前][次][番号順一覧][スレッド一覧]

ruby-changes:72851

From: Burdette <ko1@a...>
Date: Sun, 7 Aug 2022 21:07:36 +0900 (JST)
Subject: [ruby-changes:72851] 23a84d53c6 (master): [ruby/rdoc] [DOC] Removes remaining old Markup Reference (https://github.com/ruby/rdoc/pull/910)

https://git.ruby-lang.org/ruby.git/commit/?id=23a84d53c6

From 23a84d53c682e8db1d9d5b9b33fc20dc475179c2 Mon Sep 17 00:00:00 2001
From: Burdette Lamar <BurdetteLamar@Y...>
Date: Sun, 7 Aug 2022 07:07:12 -0500
Subject: [ruby/rdoc] [DOC] Removes remaining old Markup Reference
 (https://github.com/ruby/rdoc/pull/910)

https://github.com/ruby/rdoc/commit/4e44c9c6cf
---
 doc/rdoc/markup_reference.rb |  31 ++++
 lib/rdoc/markup.rb           | 349 -------------------------------------------
 2 files changed, 31 insertions(+), 349 deletions(-)

diff --git a/doc/rdoc/markup_reference.rb b/doc/rdoc/markup_reference.rb
index 49ad996c2d..c59f12cfe3 100644
--- a/doc/rdoc/markup_reference.rb
+++ b/doc/rdoc/markup_reference.rb
@@ -662,6 +662,37 @@ require 'rdoc' https://github.com/ruby/ruby/blob/trunk/doc/rdoc/markup_reference.rb#L662
 #   # [<tt>Two words</tt>] <tt>Two words</tt> in labeled list item.
 #   # ====== <tt>Two words</tt> in heading
 #
+# ==== Escaping Text Markup
+#
+# Text markup can be escaped with a backslash, as in \<tt>, which was obtained
+# with <tt>\\<tt></tt>.  Except in verbatim sections and between \<tt> 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 links:
+#
+#   * The \ must be doubled if not followed by white space: \\.
+#   * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
+#   * This is a link to {ruby-lang}[https://www.ruby-lang.org].
+#   * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org].
+#   * This will not be linked to \RDoc::RDoc#document
+#
+# generates:
+#
+# * The \ must be doubled if not followed by white space: \\.
+# * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
+# * This is a link to {ruby-lang}[https://www.ruby-lang.org]
+# * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org]
+# * This will not be linked to \RDoc::RDoc#document
+#
+# Inside \<tt> tags, more precisely, leading backslashes are removed only if
+# followed by a markup character (<tt><*_+</tt>), a backslash, or a known link
+# reference (a known class or method). So in the example above, the backslash
+# of <tt>\S</tt> 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.
+#
 # ==== Character Conversions
 #
 # Certain combinations of characters may be converted to special characters;
diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb
index 7fec1c6869..6e93030965 100644
--- a/lib/rdoc/markup.rb
+++ b/lib/rdoc/markup.rb
@@ -99,355 +99,6 @@ https://github.com/ruby/ruby/blob/trunk/lib/rdoc/markup.rb#L99
 #
 # See RDoc::MarkupReference.
 #
-# === Escaping Text Markup
-#
-# Text markup can be escaped with a backslash, as in \<tt>, which was obtained
-# with <tt>\\<tt></tt>.  Except in verbatim sections and between \<tt> 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 links:
-#
-#   * The \ must be doubled if not followed by white space: \\.
-#   * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
-#   * This is a link to {ruby-lang}[https://www.ruby-lang.org].
-#   * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org].
-#   * This will not be linked to \RDoc::RDoc#document
-#
-# generates:
-#
-# * The \ must be doubled if not followed by white space: \\.
-# * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
-# * This is a link to {ruby-lang}[https://www.ruby-lang.org]
-# * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org]
-# * This will not be linked to \RDoc::RDoc#document
-#
-# Inside \<tt> tags, more precisely, leading backslashes are removed only if
-# followed by a markup character (<tt><*_+</tt>), a backslash, or a known link
-# reference (a known class or method). So in the example above, the backslash
-# of <tt>\S</tt> 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.
-#
-# === Conversion of characters
-#
-# HTML will convert two/three dashes to an em-dash. Other common characters are
-# converted as well:
-#
-#   em-dash::  -- or ---
-#   ellipsis:: ...
-#
-#   single quotes:: 'text' or `text'
-#   double quotes:: "text" or ``text''
-#
-#   copyright:: (c)
-#   registered trademark:: (r)
-#
-# produces:
-#
-# em-dash::  -- or ---
-# ellipsis:: ...
-#
-# single quotes:: 'text' or `text'
-# double quotes:: "text" or ``text''
-#
-# copyright:: (c)
-# registered trademark:: (r)
-#
-#
-# == Documenting Source Code
-#
-# Comment blocks can be written fairly naturally, either using <tt>#</tt> on
-# successive lines of the comment, or by including the comment in
-# a <tt>=begin</tt>/<tt>=end</tt> block.  If you use the latter form,
-# the <tt>=begin</tt> line _must_ be flagged with an +rdoc+ tag:
-#
-#   =begin rdoc
-#   Documentation to be processed by RDoc.
-#
-#   ...
-#   =end
-#
-# RDoc stops processing comments if it finds a comment line starting
-# with <tt>--</tt> right after the <tt>#</tt> character (otherwise,
-# it will be treated as a rule if it has three dashes or more).
-# This can be used to separate external from internal comments,
-# or to stop a comment being associated with a method, class, or module.
-# Commenting can be turned back on with a line that starts with <tt>++</tt>.
-#
-#   ##
-#   # Extract the age and calculate the date-of-birth.
-#   #--
-#   # FIXME: fails if the birthday falls on February 29th
-#   #++
-#   # The DOB is returned as a Time object.
-#
-#   def get_dob(person)
-#     # ...
-#   end
-#
-# 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
-# will also be displayed:
-#
-#   def fred
-#     ...
-#     yield line, address
-#
-# This will get documented as:
-#
-#   fred() { |line, address| ... }
-#
-# You can override this using a comment containing ':yields: ...' immediately
-# after the method definition
-#
-#   def fred # :yields: index, position
-#     # ...
-#
-#     yield line, address
-#
-# which will get documented as
-#
-#    fred() { |index, position| ... }
-#
-# +:yields:+ is an example of a documentation directive.  These appear
-# immediately after the start of the document element they are modifying.
-#
-# RDoc automatically cross-references words with underscores or camel-case.
-# To suppress cross-references, prefix the word with a \ character.  To
-# include special characters like "<tt>\n</tt>", you'll need to use
-# two \ characters in normal text, but only one in \<tt> text:
-#
-#   "\\n" or "<tt>\n</tt>"
-#
-# produces:
-#
-# "\\n" or "<tt>\n</tt>"
-#
-# == Directives
-#
-# Directives are keywords surrounded by ":" characters.
-#
-# === Controlling what is documented
-#
-# [+:nodoc:+ / <tt>:nodoc: all</tt>]
-#   This directive prevents documentation for the element from
-#   being generated.  For classes and modules, methods, aliases,
-#   constants, and attributes directly within the affected class or
-#   module also will be omitted.  By default, though, modules and
-#   classes within that class or module _will_ be documented.  This is
-#   turned off by adding the +all+ modifier.
-#
-#     module MyModule # :nodoc:
-#       class Input
-#       end
-#     end
-#
-#     module OtherModule # :nodoc: all
-#       class Output
-#       end
-#     end
-#
-#   In the above code, only class <tt>MyModule::Input</tt> will be documented.
-#
-#   The +:nodoc:+ directive, like +:enddoc:+, +:stopdoc:+ and +:startdoc:+
-#   presented below, is local to the current file: if you do not want to
-#   document a module that appears in several files, specify +:nodoc:+ on each
-#   appearance, at least once per file.
-#
-# [+:stopdoc:+ / +:startdoc:+]
-#   Stop and start adding new documentation elements to the current container.
-#   For example, if a class has a number of constants that you don't want to
-#   document, put a +:stopdoc:+ before the first, and a +:startdoc:+ after the
-#   last.  If you don't specify a +:startdoc:+ by the end of the container,
-#   disables documentation for the rest of the current file.
-#
-# [+:doc:+]
-#   Forces a method or attribute to be documented even if it wouldn't be
-#   otherwise.  Useful if, for example, you want to include documentation of a
-#   particular private method.
-#
-# [+:enddoc:+]
-#   Document nothing further at the current level: directives +:startdoc:+ and
-#   +:doc:+ that appear after this will not be honored for the current container
-#   (file, class or module), in the current file.
-#
-# [+:notnew:+ / +:not_new:+ / +:not-new:+ ]
-#   Only applicable to the +initialize+ instance method.  Normally RDoc
-#   assumes that the documentation and parameters for +initialize+ are
-#   actually for the +new+ method, and so fakes out a +new+ for the class.
-#   The +:notnew:+ directive stops this.  Remember that +initialize+ is private,
-#   so you won't see the documentation unless you use the +-a+ command line
-#   option.
-#
-# === Method arguments
-#
-# [+:arg:+ or +:args:+ _parameters_]
-#   Overrides the default argument handling with exactly these parameters.
-#
-#     ##
-#     #  :args: a, b
-#
-#     def some_method(*a)
-#     end
-#
-# [+:yield:+ or +:yields:+ _parameters_]
-#   Overrides the default yiel (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]