Skip to content

Commit f2fefe0

Browse files
[DOC] Tweaks for markup reference intro (#1411)
1 parent 1a7aa33 commit f2fefe0

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

doc/rdoc/markup_reference.rb

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
require 'rdoc'
22

3+
# This page is about RDoc's +rdoc+ input format,
4+
# which here we'll call "RDoc markup" or simply "markup."
5+
#
6+
# == About This \Class
7+
#
38
# \Class \RDoc::MarkupReference exists only to provide a suitable home
49
# for a reference document for \RDoc markup.
510
#
@@ -21,43 +26,50 @@
2126
# >>>
2227
# Some stuff
2328
#
24-
# == \RDoc Sources
29+
# == Markup Sources
2530
#
26-
# The sources of \RDoc documentation vary according to the type of file:
31+
# The sources of markup documentation vary according to the type of file:
2732
#
2833
# - <tt>.rb</tt> (Ruby code file):
2934
#
3035
# - Markup may be found in Ruby comments:
3136
# A comment that immediately precedes the definition
3237
# of a Ruby class, module, method, alias, constant, or attribute
3338
# becomes the documentation for that defined object.
34-
# - An \RDoc directive may be found in:
39+
# - A markup directive may be found in:
3540
#
3641
# - A trailing comment (on the same line as code);
3742
# see <tt>:nodoc:</tt>, <tt>:doc:</tt>, and <tt>:notnew:</tt>.
3843
# - A single-line comment;
3944
# see other {Directives}[rdoc-ref:RDoc::MarkupReference@Directives].
4045
#
4146
# - Documentation may be derived from the Ruby code itself;
42-
# see {Documentation Derived from Ruby Code}[rdoc-ref:RDoc::MarkupReference@Documentation+Derived+from+Ruby+Code].
47+
# see {Derived Documentation}[rdoc-ref:RDoc::MarkupReference@Derived+Documentation].
4348
#
4449
# - <tt>.c</tt> (C code file): markup is parsed from C comments.
4550
# A comment that immediately precedes
4651
# a function that implements a Ruby method,
4752
# or otherwise immediately precedes the definition of a Ruby object,
4853
# becomes the documentation for that object.
49-
# - <tt>.rdoc</tt> (\RDoc markup text file) or <tt>.md</tt> (\RDoc markdown text file):
54+
# - <tt>.rdoc</tt> (markup file):
5055
# markup is parsed from the entire file.
5156
# The text is not associated with any code object,
5257
# but may (depending on how the documentation is built)
5358
# become a separate page.
5459
#
55-
# An <i>RDoc document</i>:
60+
# Note that all of the above applies to \RDoc <tt>markup</tt>-formatted documentation:
61+
#
62+
# - A C- or \Ruby-coded file may contain <tt>markdown</tt>-formatted documentation,
63+
# though that format must be declared (because the default is +markup+).
64+
# - A markdown (<tt>.md</tt>) file contains only <tt>markdown</tt>-formatted documentation.
65+
#
66+
# == Markup Document
67+
#
68+
# The term <i>markup document</i> refers to one of:
5669
#
5770
# - A (possibly multi-line) comment in a Ruby or C file
58-
# that generates \RDoc documentation (as above).
59-
# - The entire markup (<tt>.rdoc</tt>) file or markdown (<tt>.md</tt>) file
60-
# (which is usually multi-line).
71+
# that generates documentation (as above).
72+
# - An entire markup file (i.e., a file with extension <tt>.rdoc</tt>).
6173
#
6274
# == Blocks
6375
#
@@ -1141,14 +1153,15 @@
11411153
# - A double escape character \\ that is rendered
11421154
# as a single backslash.
11431155
#
1144-
# == Documentation Derived from Ruby Code
1156+
# == Derived Documentation
11451157
#
11461158
# [Class]
11471159
#
11481160
# By default, \RDoc documents:
11491161
#
11501162
# - \Class name.
11511163
# - Parent class.
1164+
# - Included modules.
11521165
# - Singleton methods.
11531166
# - Instance methods.
11541167
# - Aliases.
@@ -1160,6 +1173,7 @@
11601173
# By default, \RDoc documents:
11611174
#
11621175
# - \Module name.
1176+
# - Included modules.
11631177
# - \Singleton methods.
11641178
# - Instance methods.
11651179
# - Aliases.

0 commit comments

Comments
 (0)