Skip to content

Commit 6a4c295

Browse files
committed
Apply typo and grammar fixes by Luke Gruber. From [Ruby 1.9 - Bug #5203]
1 parent 29e41b5 commit 6a4c295

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

lib/rdoc/markup.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# sequences, and to add special processing for text that matches a
3737
# regular expression. Here we make WikiWords significant to the parser,
3838
# and also make the sequences {word} and \<no>text...</no> signify
39-
# strike-through text. When then subclass the HTML output class to deal
39+
# strike-through text. We then subclass the HTML output class to deal
4040
# with these:
4141
#
4242
# require 'rdoc/markup'
@@ -61,7 +61,7 @@
6161
#
6262
# == Encoding
6363
#
64-
# Where Encoding support is available RDoc will automatically convert all
64+
# Where Encoding support is available, RDoc will automatically convert all
6565
# documents to the same output encoding. The output encoding can be set via
6666
# RDoc::Options#encoding and defaults to Encoding.default_external.
6767
#
@@ -127,7 +127,7 @@
127127
# === Simple Lists
128128
#
129129
# If a paragraph starts with a "*", "-", "<digit>." or "<letter>.",
130-
# then it is taken to be the start of a list. The margin in increased to be
130+
# then it is taken to be the start of a list. The margin is increased to be
131131
# the first non-space following the list start flag. Subsequent lines
132132
# should be indented to this new margin until the list ends. For example:
133133
#
@@ -444,10 +444,10 @@
444444
#
445445
# [+:nodoc:+ / <tt>:nodoc: all</tt>]
446446
# This directive prevents documentation for the element from
447-
# being generated. For classes and modules, the methods, aliases,
447+
# being generated. For classes and modules, methods, aliases,
448448
# constants, and attributes directly within the affected class or
449449
# module also will be omitted. By default, though, modules and
450-
# classes within that class of module _will_ be documented. This is
450+
# classes within that class or module _will_ be documented. This is
451451
# turned off by adding the +all+ modifier.
452452
#
453453
# module MyModule # :nodoc:
@@ -591,7 +591,7 @@ class RDoc::Markup
591591
attr_reader :attribute_manager
592592

593593
##
594-
# Take a block of text and use various heuristics to determine it's
594+
# Take a block of text and use various heuristics to determine its
595595
# structure (paragraphs, lists, and so on). Invoke an event handler as we
596596
# identify significant chunks.
597597

lib/rdoc/parser.rb

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
require 'rdoc/stats'
55

66
##
7-
# A parser is simple a class that implements
7+
# A parser is a class that subclasses RDoc::Parser and implements
88
#
9-
# #initialize(file_name, body, options)
9+
# #initialize top_level, file_name, body, options, stats
1010
#
1111
# and
1212
#
@@ -16,17 +16,16 @@
1616
# and an RDoc::Options object. The scan method is then called to return an
1717
# appropriately parsed TopLevel code object.
1818
#
19-
# The ParseFactory is used to redirect to the correct parser given a
20-
# filename extension. This magic works because individual parsers have to
21-
# register themselves with us as they are loaded in. The do this using the
22-
# following incantation
19+
# RDoc::Parser::for is a factory that creates the correct parser for a
20+
# given filename extension. Parsers have to register themselves RDoc::Parser
21+
# using parse_files_matching as when they are loaded:
2322
#
2423
# require "rdoc/parser"
2524
#
2625
# class RDoc::Parser::Xyz < RDoc::Parser
2726
# parse_files_matching /\.xyz$/ # <<<<
2827
#
29-
# def initialize(file_name, body, options)
28+
# def initialize top_level, file_name, body, options, stats
3029
# ...
3130
# end
3231
#
@@ -35,8 +34,8 @@
3534
# end
3635
# end
3736
#
38-
# Just to make life interesting, if we suspect a plain text file, we also
39-
# look for a shebang line just in case it's a potential shell script
37+
# If a plain text file is detected, RDoc also looks for a shebang line in case
38+
# the file is a shell script.
4039

4140
class RDoc::Parser
4241

@@ -45,8 +44,8 @@ class RDoc::Parser
4544
class << self
4645

4746
##
48-
# A Hash that maps file extensions regular expressions to parsers that
49-
# will consume them.
47+
# An Array of arrays that maps file extension (or name) regular
48+
# expressions to parser classes that will parse matching filenames.
5049
#
5150
# Use parse_files_matching to register a parser's file extensions.
5251

0 commit comments

Comments
 (0)