Skip to content

Commit 19f0512

Browse files
committed
Improve CONTRIBUTING.rdoc
This fixes some trivial mistakes in the CONTRIBUTING document without changing the content largely. - Fix typos - Add commas for readability - Fix grammar mistakes - Fix broken links - Use monospace font where necessary
1 parent fdaa5a6 commit 19f0512

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

CONTRIBUTING.rdoc

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ classes for each feature.
88
== Bugs
99

1010
If you think you found a bug, file a ticket on the {issues
11-
tracker}[https://github.com/ruby/rdoc/issues] on github.
11+
tracker}[https://github.com/ruby/rdoc/issues] on GitHub.
1212

13-
If your bug involves an error RDoc produced please include a sample file that
13+
If your bug involves an error RDoc produced, please include a sample file that
1414
illustrates the problem or link to the repository or gem that is associated
1515
with the bug.
1616

@@ -28,19 +28,19 @@ RDoc uses bundler for development. To get ready to work on RDoc run:
2828
[...]
2929
$ bundle install
3030
[...]
31-
$ rake
31+
$ bundle exec rake
3232
[...]
3333

34-
This will install all the necessary dependencies for development with rake,
34+
This will install all the necessary dependencies for development with +rake+,
3535
generate documentation and run the tests for the first time.
3636

37-
If the tests don't pass on the first run check the {GitHub Actions page}[https://github.com/ruby/rdoc/actions] to see if there are any known failures
38-
(there shouldn't be).
37+
If the tests don't pass on the first run, check the {GitHub Actions page}[https://github.com/ruby/rdoc/actions]
38+
to see if there are any known failures (there shouldn't be).
3939

40-
You can now use `rake` and `autotest` to run the tests.
40+
You can now use +rake+ and +autotest+ to run the tests.
4141

42-
Note: the `rake` command must be used first before running any tests, because
43-
it's used to generate various parsers implemented in RDoc. Also `rake clean` is
42+
Note: the +rake+ command must be used first before running any tests, because
43+
it's used to generate various parsers implemented in RDoc. Also <tt>rake clean</tt> is
4444
helpful to delete these generated files.
4545

4646
== Glossary
@@ -85,7 +85,7 @@ formatter::
8585

8686
== Plugins
8787

88-
When 'rdoc/rdoc' is loaded RDoc looks for 'rdoc/discover' files in your
88+
When +rdoc/rdoc+ is loaded, RDoc looks for +rdoc/discover+ files in your
8989
installed gems. This can be used to load parsers, alternate generators, or
9090
additional preprocessor directives. An rdoc plugin layout should look
9191
something like this:
@@ -94,7 +94,7 @@ something like this:
9494
lib/my/rdoc/plugin.rb
9595
# etc.
9696

97-
In your rdoc/discover.rb file you will want to wrap the loading of your plugin
97+
In your +rdoc/discover.rb+ file, you will want to wrap the loading of your plugin
9898
in an RDoc version check like this:
9999

100100
begin
@@ -105,19 +105,19 @@ in an RDoc version check like this:
105105

106106
=== Plugin Types
107107

108-
In RDoc you can change the following behaviors:
108+
In RDoc, you can change the following behaviors:
109109

110110
* Add a parser for a new file format
111111
* Add a new output generator
112112
* Add a new markup directive
113113
* Add a new type of documentation markup
114114
* Add a new type of formatter
115115

116-
All of these are described below
116+
All of these are described below.
117117

118118
== Option Parsing
119119

120-
Option parsing is handled by RDoc::Options. When you're writing a generator
120+
Option parsing is handled by RDoc::Options. When you're writing a generator,
121121
you can provide the user with extra options by providing a class method
122122
+setup_options+. The option parser will call this after your generator is
123123
loaded. See RDoc::Generator for details.
@@ -126,20 +126,20 @@ loaded. See RDoc::Generator for details.
126126

127127
After options are parsed, RDoc parses files from the files and directories in
128128
ARGV. RDoc compares the filename against what each parser claims it can parse
129-
via RDoc::Parser#parse_files_matching. For example, RDoc::Parser::C can parse
129+
via RDoc::Parser.parse_files_matching. For example, RDoc::Parser::C can parse
130130
C files, C headers, C++ files, C++ headers and yacc grammars.
131131

132-
Once a matching parser class is found it is instantiated and +scan+ is called.
133-
The parser needs to extract documentation from the file and add it to the RDoc
132+
Once a matching parser class is found, it is instantiated and +scan+ is called.
133+
The parser needs to extract documentation from the file and adds it to the RDoc
134134
document tree. Usually this involves starting at the root and adding a class
135135
or a module (RDoc::TopLevel#add_class and RDoc::TopLevel#add_module) and
136136
proceeding to add classes, modules and methods to each nested item.
137137

138-
When the parsers are finished the document tree is cleaned up to remove
138+
When the parsers are finished, the document tree is cleaned up to remove
139139
dangling references to aliases and includes that were not found (and may exist
140140
in a separate library) through RDoc::ClassModule#complete.
141141

142-
To write your own parser for a new file format see RDoc::Parser.
142+
To write your own parser for a new file format, see RDoc::Parser.
143143

144144
=== Documentation Tree
145145

@@ -159,26 +159,26 @@ RDoc comes with an HTML generator (RDoc::Generator::Darkfish) and an RI
159159
database generator (RDoc::Generator::RI). The output a generator creates does
160160
not have to be human-readable.
161161

162-
To create your own generator see RDoc::Generator.
162+
To create your own generator, see RDoc::Generator.
163163

164164
=== Comments
165165

166-
In RDoc 3.10 and newer the comment on an RDoc::CodeObject is now an
166+
In RDoc 3.10 and newer, the comment on an RDoc::CodeObject is now an
167167
RDoc::Comment object instead of a String. This is to support various
168168
documentation markup formats like rdoc, TomDoc and rd. The comments are
169-
normalized to remove comment markers and remove indentation then parsed lazily
169+
normalized to remove comment markers and indentation, and then parsed lazily
170170
via RDoc::Comment#document to create a generic markup tree that can be
171171
processed by a formatter.
172172

173-
To add your own markup format see RDoc::Markup@Other+directives
173+
To add your own markup format, see RDoc::Markup@Other+directives.
174174

175175
==== Formatters
176176

177177
To transform a comment into some form of output an RDoc::Markup::Formatter
178178
subclass is used like RDoc::Markup::ToHtml. A formatter is a visitor that
179179
walks a parsed comment tree (an RDoc::Markup::Document) of any format. To help
180-
write a formatter RDoc::Markup::FormatterTestCase exists for generic parsers,
181-
and RDoc::Markup::TextFormatterTestCase which contains extra test cases for
180+
write a formatter, +RDoc::Markup::FormatterTestCase+ exists for generic parsers,
181+
and +RDoc::Markup::TextFormatterTestCase+ which contains extra test cases for
182182
text-type output (like +ri+ output).
183183

184184
RDoc ships with formatters that will turn a comment into HTML, rdoc-markup-like
@@ -193,23 +193,23 @@ length for a comment, for example.
193193

194194
==== Directives
195195

196-
For comments in markup you can add new directives (:nodoc: is a directive).
196+
For comments in markup you can add new directives (+:nodoc:+ is a directive).
197197
Directives may replace text or store it off for later use.
198198

199199
See RDoc::Markup::PreProcess::register for details.
200200

201-
=== JSONIndex
201+
=== JSON Index
202202

203-
RDoc contains a special generator, RDoc::Generator::JSONIndex, which creates a
203+
RDoc contains a special generator, RDoc::Generator::JsonIndex, which creates a
204204
JSON-based search index and includes a search engine for use with HTML output.
205205
This generator can be used to add searching to any HTML output and is designed
206206
to be called from inside an HTML generator.
207207

208208
== Markup
209209

210210
Additional documentation markup formats can be added to RDoc. A markup
211-
parsing class must respond to \::parse and accept a String argument containing
212-
the markup format. An RDoc::Document containing documentation items
211+
parsing class must respond to +::parse+ and accept a String argument containing
212+
the markup format. An RDoc::Markup::Document containing documentation items
213213
(RDoc::Markup::Heading, RDoc::Markup::Paragraph, RDoc::Markup::Verbatim, etc.)
214214
must be returned.
215215

0 commit comments

Comments
 (0)