@@ -7,7 +7,7 @@ in the Ruby core and in the Ruby standard library.
77## Generating documentation
88
99Most Ruby documentation lives in the source files and is written in
10- [ RDoc format] ( rdoc-ref: RDoc:: MarkupReference) .
10+ [ RDoc format] ( https://ruby.github.io/rdoc/ RDoc/ MarkupReference.html ) .
1111
1212Some pages live under the ` doc ` folder and can be written in either
1313` .rdoc ` or ` .md ` format, determined by the file extension.
@@ -44,14 +44,13 @@ Use your judgment about what the user needs to know.
4444- Group sentences into (ideally short) paragraphs,
4545 each covering a single topic.
4646- Organize material with
47- [ headings] ( rdoc-ref:RDoc::MarkupReference@Headings ) .
47+ [ headings] .
4848- Refer to authoritative and relevant sources using
49- [ links] ( rdoc-ref: RDoc::MarkupReference@ Links ) .
49+ [ links] ( https://ruby.github.io/ rdoc/RDoc/MarkupReference.html#class- RDoc::MarkupReference-label- Links) .
5050- Use simple verb tenses: simple present, simple past, simple future.
5151- Use simple sentence structure, not compound or complex structure.
5252- Avoid:
53- - Excessive comma-separated phrases;
54- consider a [ list] ( rdoc-ref:RDoc::MarkupReference@Lists ) .
53+ - Excessive comma-separated phrases; consider a [ list] .
5554 - Idioms and culture-specific references.
5655 - Overuse of headings.
5756 - Using US-ASCII-incompatible characters in C source files;
@@ -110,7 +109,7 @@ involving new files `doc/*.rdoc`:
110109
111110Ruby is documented using RDoc.
112111For information on \RDoc syntax and features, see the
113- [RDoc Markup Reference](rdoc-ref: RDoc:: MarkupReference).
112+ [RDoc Markup Reference](https://ruby.github.io/rdoc/ RDoc/ MarkupReference.html ).
114113
115114### Output from `irb`
116115
@@ -129,22 +128,21 @@ a #=> [2, 3, 1]
129128
130129### Headings
131130
132- Organize a long discussion for a class or module with [headings](rdoc-ref:RDoc::MarkupReference@Headings) .
131+ Organize a long discussion for a class or module with [headings].
133132
134133Do not use formal headings in the documentation for a method or constant.
135134
136135In the rare case where heading-like structures are needed
137136within the documentation for a method or constant, use
138- [bold text](rdoc-ref: RDoc::MarkupReference@ Bold)
137+ [bold text](https://ruby.github.io/ rdoc/RDoc/MarkupReference.html#class- RDoc::MarkupReference-label- Bold)
139138as pseudo-headings.
140139
141140### Blank Lines
142141
143142A blank line begins a new paragraph.
144143
145- A [code block](rdoc-ref:RDoc::MarkupReference@Code+Blocks)
146- or [list](rdoc-ref:RDoc::MarkupReference@Lists)
147- should be preceded by and followed by a blank line.
144+ A [code block](https://ruby.github.io/rdoc/RDoc/MarkupReference.html#class-RDoc::MarkupReference-label-Code+Blocks)
145+ or [list] should be preceded by and followed by a blank line.
148146This is unnecessary for the HTML output, but helps in the `ri` output.
149147
150148### \Method Names
@@ -164,7 +162,7 @@ For a method name in text:
164162
165163Code or commands embedded in running text (i.e., not in a code block)
166164should marked up as
167- [monofont](rdoc-ref:RDoc::MarkupReference@Monofont) .
165+ [monofont].
168166
169167Code that is a simple string should include the quote marks.
170168
@@ -214,7 +212,7 @@ refers to the current document
214212(e.g., _Float_ in the documentation for class Float ).
215213
216214In this case you may consider forcing the name to
217- [monofont](rdoc - ref: RDoc :: MarkupReference @Monofont ) ,
215+ [monofont],
218216which suppresses auto- linking, and also emphasizes that the word is a class name:
219217
220218` ` ` rdoc
@@ -276,7 +274,7 @@ Use the +rdoc-ref+ scheme for:
276274- A link in a standard library package to other documentation in that same
277275 standard library package.
278276
279- See section " +rdoc-ref+ Scheme" in { Links }[rdoc - ref: RDoc :: MarkupReference @Links ].
277+ See section " +rdoc-ref+ Scheme" in [links ].
280278
281279# ### URL-Based Link
282280
@@ -296,7 +294,7 @@ Also use a full URL-based link for a link to an off-site document.
296294# ## Variable Names
297295
298296The name of a variable (as specified in its call- seq) should be marked up as
299- [monofont](rdoc - ref: RDoc :: MarkupReference @Monofont ) .
297+ [monofont].
300298
301299Also , use monofont text for the name of a transient variable
302300(i.e., one defined and used only in the discussion, such as + n+ ).
@@ -314,9 +312,9 @@ In particular, avoid building tables with HTML tags
314312
315313Alternatives:
316314
317- - A {verbatim text block}[rdoc-ref: RDoc::MarkupReference@ Verbatim+Text+Blocks],
315+ - A {verbatim text block}[https://ruby.github.io/ rdoc/RDoc/MarkupReference.html#class- RDoc::MarkupReference-label- Verbatim+Text+Blocks],
318316 using spaces and punctuation to format the text;
319- note that {text markup}[rdoc-ref: RDoc::MarkupReference@ Text+Markup]
317+ note that {text markup}[https://ruby.github.io/ rdoc/RDoc/MarkupReference.html#class- RDoc::MarkupReference-label- Text+Markup]
320318 will not be honored:
321319
322320 - Example {source}[https://github.com/ruby/ruby/blob/34d802f32f00df1ac0220b62f72605827c16bad8/file.c#L6570-L6596].
@@ -356,8 +354,7 @@ Guidelines:
356354
357355- The section title is `What' s Here ` .
358356- Consider listing the parent class and any included modules; consider
359- [links](rdoc-ref:RDoc::MarkupReference@Links)
360- to their "What's Here" sections if those exist.
357+ [links] to their "What's Here" sections if those exist.
361358- All methods mentioned in the left-pane table of contents
362359 should be listed (including any methods extended from another class).
363360- Attributes (which are not included in the TOC) may also be listed.
@@ -369,7 +366,7 @@ Guidelines:
369366 (and do not list the aliases separately).
370367 - Check the rendered documentation to determine whether \R Doc has recognized
371368 the method and linked to it; if not, manually insert a
372- [link](rdoc-ref: RDoc::MarkupReference@ Links).
369+ [link](https://ruby.github.io/ rdoc/RDoc/MarkupReference.html#class- RDoc::MarkupReference-label- Links).
373370
374371- If there are numerous entries, consider grouping them into subsections with headings.
375372- If there are more than a few such subsections,
@@ -395,7 +392,7 @@ For methods written in Ruby, \RDoc documents the calling sequence automatically.
395392
396393For methods written in C, \R Doc cannot determine what arguments
397394the method accepts, so those need to be documented using \R Doc directive
398- [` call- seq: ` ](rdoc-ref: RDoc::MarkupReference@ Directives+for+Method+Documentation).
395+ [` call- seq: ` ](https://ruby.github.io/ rdoc/RDoc/MarkupReference.html#class- RDoc::MarkupReference-label- Directives+for+Method+Documentation).
399396
400397For a singleton method, use the form:
401398
@@ -570,7 +567,7 @@ argument passed if it is not obvious, not explicitly mentioned in the
570567details, and not implicitly shown in the examples.
571568
572569If there is more than one argument or block argument, use a
573- [ labeled list] ( rdoc-ref: RDoc::MarkupReference@ Labeled+Lists ) .
570+ [ labeled list] ( https://ruby.github.io/ rdoc/RDoc/MarkupReference.html#class- RDoc::MarkupReference-label- Labeled+Lists) .
574571
575572### Corner Cases and Exceptions
576573
@@ -610,3 +607,7 @@ mention `Hash#fetch` as a related method, and `Hash#merge` might mention
610607For methods that accept multiple argument types, in some cases it can
611608be useful to document the different argument types separately. It's
612609best to use a separate paragraph for each case you are discussing.
610+
611+ [ headings ] : https://ruby.github.io/rdoc/RDoc/MarkupReference.html#class-RDoc::MarkupReference-label-Headings
612+ [ list ] : https://ruby.github.io/rdoc/RDoc/MarkupReference.html#class-RDoc::MarkupReference-label-Lists
613+ [ monofont ] : https://ruby.github.io/rdoc/RDoc/MarkupReference.html#class-RDoc::MarkupReference-label-Monofont
0 commit comments