rdoc 2.5.11 → 3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rdoc might be problematic. Click here for more details.

Files changed (113) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.document +1 -0
  3. data/History.txt +95 -0
  4. data/Manifest.txt +13 -4
  5. data/README.txt +9 -3
  6. data/Rakefile +1 -1
  7. data/lib/rdoc.rb +15 -298
  8. data/lib/rdoc/alias.rb +65 -16
  9. data/lib/rdoc/any_method.rb +27 -150
  10. data/lib/rdoc/attr.rb +36 -115
  11. data/lib/rdoc/class_module.rb +236 -22
  12. data/lib/rdoc/code_object.rb +76 -31
  13. data/lib/rdoc/constant.rb +32 -4
  14. data/lib/rdoc/context.rb +494 -222
  15. data/lib/rdoc/encoding.rb +79 -0
  16. data/lib/rdoc/erbio.rb +37 -0
  17. data/lib/rdoc/gauntlet.rb +9 -5
  18. data/lib/rdoc/generator.rb +33 -1
  19. data/lib/rdoc/generator/darkfish.rb +284 -375
  20. data/lib/rdoc/generator/markup.rb +72 -36
  21. data/lib/rdoc/generator/ri.rb +4 -4
  22. data/lib/rdoc/generator/template/darkfish/classpage.rhtml +267 -274
  23. data/lib/rdoc/generator/template/darkfish/filepage.rhtml +91 -91
  24. data/lib/rdoc/generator/template/darkfish/index.rhtml +45 -45
  25. data/lib/rdoc/generator/template/darkfish/rdoc.css +298 -298
  26. data/lib/rdoc/include.rb +40 -1
  27. data/lib/rdoc/known_classes.rb +1 -0
  28. data/lib/rdoc/markup.rb +467 -2
  29. data/lib/rdoc/markup/attribute_manager.rb +24 -6
  30. data/lib/rdoc/markup/blank_line.rb +11 -3
  31. data/lib/rdoc/markup/document.rb +6 -0
  32. data/lib/rdoc/markup/formatter.rb +10 -0
  33. data/lib/rdoc/markup/formatter_test_case.rb +339 -3
  34. data/lib/rdoc/markup/heading.rb +3 -0
  35. data/lib/rdoc/markup/inline.rb +11 -1
  36. data/lib/rdoc/markup/list.rb +3 -0
  37. data/lib/rdoc/markup/list_item.rb +3 -0
  38. data/lib/rdoc/markup/paragraph.rb +3 -0
  39. data/lib/rdoc/markup/parser.rb +191 -237
  40. data/lib/rdoc/markup/{preprocess.rb → pre_process.rb} +50 -29
  41. data/lib/rdoc/markup/raw.rb +4 -0
  42. data/lib/rdoc/markup/rule.rb +3 -0
  43. data/lib/rdoc/markup/text_formatter_test_case.rb +116 -0
  44. data/lib/rdoc/markup/to_ansi.rb +14 -2
  45. data/lib/rdoc/markup/to_bs.rb +8 -2
  46. data/lib/rdoc/markup/to_html.rb +84 -91
  47. data/lib/rdoc/markup/to_html_crossref.rb +77 -26
  48. data/lib/rdoc/markup/to_rdoc.rb +94 -49
  49. data/lib/rdoc/markup/to_test.rb +9 -1
  50. data/lib/rdoc/markup/verbatim.rb +6 -3
  51. data/lib/rdoc/method_attr.rb +353 -0
  52. data/lib/rdoc/normal_class.rb +11 -2
  53. data/lib/rdoc/normal_module.rb +0 -5
  54. data/lib/rdoc/options.rb +373 -82
  55. data/lib/rdoc/parser.rb +59 -23
  56. data/lib/rdoc/parser/c.rb +224 -86
  57. data/lib/rdoc/parser/ruby.rb +219 -111
  58. data/lib/rdoc/parser/ruby_tools.rb +4 -1
  59. data/lib/rdoc/parser/simple.rb +9 -4
  60. data/lib/rdoc/rdoc.rb +68 -28
  61. data/lib/rdoc/require.rb +21 -0
  62. data/lib/rdoc/ri/driver.rb +20 -10
  63. data/lib/rdoc/ri/paths.rb +2 -2
  64. data/lib/rdoc/ri/store.rb +22 -5
  65. data/lib/rdoc/ruby_lex.rb +11 -12
  66. data/lib/rdoc/ruby_token.rb +2 -2
  67. data/lib/rdoc/single_class.rb +2 -1
  68. data/lib/rdoc/stats.rb +202 -162
  69. data/lib/rdoc/stats/normal.rb +51 -0
  70. data/lib/rdoc/stats/quiet.rb +59 -0
  71. data/lib/rdoc/stats/verbose.rb +45 -0
  72. data/lib/rdoc/text.rb +133 -4
  73. data/lib/rdoc/{tokenstream.rb → token_stream.rb} +0 -2
  74. data/lib/rdoc/top_level.rb +230 -39
  75. data/test/test_attribute_manager.rb +58 -7
  76. data/test/test_rdoc_alias.rb +13 -0
  77. data/test/test_rdoc_any_method.rb +43 -2
  78. data/test/test_rdoc_attr.rb +15 -8
  79. data/test/test_rdoc_class_module.rb +133 -0
  80. data/test/test_rdoc_code_object.rb +62 -5
  81. data/test/test_rdoc_context.rb +72 -26
  82. data/test/test_rdoc_encoding.rb +145 -0
  83. data/test/test_rdoc_generator_darkfish.rb +119 -0
  84. data/test/test_rdoc_generator_ri.rb +22 -2
  85. data/test/test_rdoc_include.rb +79 -0
  86. data/test/test_rdoc_markup_attribute_manager.rb +4 -4
  87. data/test/test_rdoc_markup_parser.rb +134 -95
  88. data/test/test_rdoc_markup_pre_process.rb +7 -2
  89. data/test/test_rdoc_markup_to_ansi.rb +43 -153
  90. data/test/test_rdoc_markup_to_bs.rb +42 -156
  91. data/test/test_rdoc_markup_to_html.rb +130 -58
  92. data/test/test_rdoc_markup_to_html_crossref.rb +10 -10
  93. data/test/test_rdoc_markup_to_rdoc.rb +40 -151
  94. data/test/test_rdoc_method_attr.rb +122 -0
  95. data/test/test_rdoc_normal_class.rb +1 -1
  96. data/test/test_rdoc_normal_module.rb +6 -1
  97. data/test/test_rdoc_options.rb +237 -12
  98. data/test/test_rdoc_parser.rb +3 -22
  99. data/test/test_rdoc_parser_c.rb +203 -2
  100. data/test/test_rdoc_parser_ruby.rb +403 -89
  101. data/test/test_rdoc_parser_simple.rb +25 -1
  102. data/test/test_rdoc_rdoc.rb +44 -32
  103. data/test/test_rdoc_ri_driver.rb +29 -24
  104. data/test/test_rdoc_ri_store.rb +46 -3
  105. data/test/test_rdoc_task.rb +1 -1
  106. data/test/test_rdoc_text.rb +102 -8
  107. data/test/test_rdoc_top_level.rb +13 -4
  108. data/test/xref_data.rb +8 -0
  109. data/test/xref_test_case.rb +6 -0
  110. metadata +29 -19
  111. metadata.gz.sig +0 -0
  112. data/lib/rdoc/parser/perl.rb +0 -165
  113. data/test/test_rdoc_parser_perl.rb +0 -73
@@ -9,10 +9,10 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
9
9
  ##
10
10
  # Regular expression to match class references
11
11
  #
12
- # 1) There can be a '\' in front of text to suppress any cross-references
13
- # 2) There can be a '::' in front of class names to reference from the
12
+ # 1. There can be a '\\' in front of text to suppress the cross-reference
13
+ # 2. There can be a '::' in front of class names to reference from the
14
14
  # top-level namespace.
15
- # 3) The method can be followed by parenthesis
15
+ # 3. The method can be followed by parenthesis (not recommended)
16
16
 
17
17
  CLASS_REGEXP_STR = '\\\\?((?:\:{2})?[A-Z]\w*(?:\:\:\w+)*)'
18
18
 
@@ -34,10 +34,10 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
34
34
  # A::B::C.meth
35
35
  #{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR}
36
36
 
37
- # Stand-alone method (proceeded by a #)
37
+ # Stand-alone method (preceeded by a #)
38
38
  | \\?\##{METHOD_REGEXP_STR}
39
39
 
40
- # Stand-alone method (proceeded by ::)
40
+ # Stand-alone method (preceeded by ::)
41
41
  | ::#{METHOD_REGEXP_STR}
42
42
 
43
43
  # A::B::C
@@ -51,9 +51,10 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
51
51
  # In order that words like "can't" not
52
52
  # be flagged as potential cross-references, only
53
53
  # flag potential class cross-references if the character
54
- # after the cross-referece is a space or sentence
55
- # punctuation.
56
- | #{CLASS_REGEXP_STR}(?=[\s\)\.\?\!\,\;]|\z)
54
+ # after the cross-referece is a space, sentence
55
+ # punctuation, tag start character, or attribute
56
+ # marker.
57
+ | #{CLASS_REGEXP_STR}(?=[\s\)\.\?\!\,\;<\000]|\z)
57
58
 
58
59
  # Things that look like filenames
59
60
  # The key thing is that there must be at least
@@ -62,7 +63,29 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
62
63
  | (?:\.\.\/)*[-\/\w]+[_\/\.][-\w\/\.]+
63
64
 
64
65
  # Things that have markup suppressed
65
- | \\[^\s]
66
+ # Don't process things like '\<' in \<tt>, though.
67
+ # TODO: including < is a hack, not very satisfying.
68
+ | \\[^\s<]
69
+ )/x
70
+
71
+ ##
72
+ # Version of CROSSREF_REGEXP used when <tt>--hyperlink-all</tt> is specified.
73
+
74
+ ALL_CROSSREF_REGEXP = /(
75
+ # A::B::C.meth
76
+ #{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR}
77
+
78
+ # Stand-alone method
79
+ | \\?#{METHOD_REGEXP_STR}
80
+
81
+ # A::B::C
82
+ | #{CLASS_REGEXP_STR}(?=[\s\)\.\?\!\,\;<\000]|\z)
83
+
84
+ # Things that look like filenames
85
+ | (?:\.\.\/)*[-\/\w]+[_\/\.][-\w\/\.]+
86
+
87
+ # Things that have markup suppressed
88
+ | \\[^\s<]
66
89
  )/x
67
90
 
68
91
  ##
@@ -78,17 +101,21 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
78
101
  ##
79
102
  # Creates a new crossref resolver that generates links relative to +context+
80
103
  # which lives at +from_path+ in the generated files. '#' characters on
81
- # references are removed unless +show_hash+ is true.
104
+ # references are removed unless +show_hash+ is true. Only method names
105
+ # preceded by '#' or '::' are hyperlinked, unless +hyperlink_all+ is true.
82
106
 
83
- def initialize(from_path, context, show_hash)
107
+ def initialize(from_path, context, show_hash, hyperlink_all = false)
84
108
  raise ArgumentError, 'from_path cannot be nil' if from_path.nil?
85
109
  super()
86
110
 
87
- @markup.add_special(CROSSREF_REGEXP, :CROSSREF)
111
+ crossref_re = hyperlink_all ? ALL_CROSSREF_REGEXP : CROSSREF_REGEXP
112
+
113
+ @markup.add_special crossref_re, :CROSSREF
88
114
 
89
115
  @from_path = from_path
90
116
  @context = context
91
117
  @show_hash = show_hash
118
+ @hyperlink_all = hyperlink_all
92
119
 
93
120
  @seen = {}
94
121
  end
@@ -97,18 +124,21 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
97
124
  # We're invoked when any text matches the CROSSREF pattern. If we find the
98
125
  # corresponding reference, generate a hyperlink. If the name we're looking
99
126
  # for contains no punctuation, we look for it up the module/class chain.
100
- # For example, HyperlinkHtml is found, even without the Generator:: prefix,
101
- # because we look for it in module Generator first.
127
+ # For example, ToHtml is found, even without the <tt>RDoc::Markup::</tt>
128
+ # prefix, because we look for it in module Markup first.
102
129
 
103
130
  def handle_special_CROSSREF(special)
104
131
  name = special.text
105
132
 
106
- # This ensures that words consisting of only lowercase letters will not
107
- # have cross-references generated (to suppress lots of erroneous
108
- # cross-references to "new" in text, for instance)
109
- return name if name =~ /\A[a-z]*\z/
133
+ unless @hyperlink_all then
134
+ # This ensures that words entirely consisting of lowercase letters will
135
+ # not have cross-references generated (to suppress lots of erroneous
136
+ # cross-references to "new" in text, for instance)
137
+ return name if name =~ /\A[a-z]*\z/
138
+ end
110
139
 
111
140
  return @seen[name] if @seen.include? name
141
+
112
142
  lookup = name
113
143
 
114
144
  name = name[1..-1] unless @show_hash if name[0, 1] == '#'
@@ -124,26 +154,47 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
124
154
  # whether the string as a whole is a known symbol).
125
155
 
126
156
  if /#{CLASS_REGEXP_STR}([.#]|::)#{METHOD_REGEXP_STR}/ =~ lookup then
127
- container = $1
128
157
  type = $2
129
- type = '#' if type == '.'
158
+ type = '' if type == '.' # will find either #method or ::method
130
159
  method = "#{type}#{$3}"
131
- ref = @context.find_symbol container, method
160
+ container = @context.find_symbol_module($1)
161
+ elsif /^([.#]|::)#{METHOD_REGEXP_STR}/ =~ lookup then
162
+ type = $1
163
+ type = '' if type == '.'
164
+ method = "#{type}#{$2}"
165
+ container = @context
166
+ else
167
+ container = nil
168
+ end
169
+
170
+ if container then
171
+ ref = container.find_local_symbol method
172
+
173
+ unless ref || RDoc::TopLevel === container then
174
+ ref = container.find_ancestor_local_symbol method
175
+ end
132
176
  end
133
177
 
134
178
  ref = @context.find_symbol lookup unless ref
179
+ ref = nil if RDoc::Alias === ref # external alias: can't link to it
135
180
 
136
181
  out = if lookup == '\\' then
137
182
  lookup
138
183
  elsif lookup =~ /^\\/ then
139
- $'
140
- elsif ref and ref.document_self then
141
- "<a href=\"#{ref.as_href @from_path}\">#{name}</a>"
184
+ # we remove the \ only in front of what we know:
185
+ # other backslashes are treated later, only outside of <tt>
186
+ ref ? $' : lookup
187
+ elsif ref then
188
+ if ref.document_self then
189
+ "<a href=\"#{ref.as_href @from_path}\">#{name}</a>"
190
+ else
191
+ name
192
+ end
142
193
  else
143
- name
194
+ lookup
144
195
  end
145
196
 
146
- @seen[name] = out
197
+ @seen[lookup] = out
147
198
 
148
199
  out
149
200
  end
@@ -1,3 +1,4 @@
1
+ require 'rdoc/markup/formatter'
1
2
  require 'rdoc/markup/inline'
2
3
 
3
4
  ##
@@ -5,21 +6,49 @@ require 'rdoc/markup/inline'
5
6
 
6
7
  class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
7
8
 
9
+ ##
10
+ # Current indent amount for output in characters
11
+
8
12
  attr_accessor :indent
13
+
14
+ ##
15
+ # Output width in characters
16
+
17
+ attr_accessor :width
18
+
19
+ ##
20
+ # Stack of current list indexes for alphabetic and numeric lists
21
+
9
22
  attr_reader :list_index
23
+
24
+ ##
25
+ # Stack of list types
26
+
10
27
  attr_reader :list_type
28
+
29
+ ##
30
+ # Stack of list widths for indentation
31
+
11
32
  attr_reader :list_width
33
+
34
+ ##
35
+ # Prefix for the next list item. See #use_prefix
36
+
12
37
  attr_reader :prefix
38
+
39
+ ##
40
+ # Output accumulator
41
+
13
42
  attr_reader :res
14
43
 
44
+ ##
45
+ # Creates a new formatter that will output (mostly) \RDoc markup
46
+
15
47
  def initialize
16
48
  super
17
49
 
18
- @markup.add_special(/\\[^\s]/, :SUPPRESSED_CROSSREF)
19
-
50
+ @markup.add_special(/\\\S/, :SUPPRESSED_CROSSREF)
20
51
  @width = 78
21
- @prefix = ''
22
-
23
52
  init_tags
24
53
 
25
54
  @headings = {}
@@ -34,7 +63,7 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
34
63
  end
35
64
 
36
65
  ##
37
- # Maps attributes to ANSI sequences
66
+ # Maps attributes to HTML sequences
38
67
 
39
68
  def init_tags
40
69
  add_tag :BOLD, "<b>", "</b>"
@@ -42,10 +71,16 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
42
71
  add_tag :EM, "<em>", "</em>"
43
72
  end
44
73
 
74
+ ##
75
+ # Adds +blank_line+ to the output
76
+
45
77
  def accept_blank_line blank_line
46
78
  @res << "\n"
47
79
  end
48
80
 
81
+ ##
82
+ # Adds +heading+ to the output
83
+
49
84
  def accept_heading heading
50
85
  use_prefix or @res << ' ' * @indent
51
86
  @res << @headings[heading.level][0]
@@ -54,12 +89,18 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
54
89
  @res << "\n"
55
90
  end
56
91
 
92
+ ##
93
+ # Finishes consumption of +list+
94
+
57
95
  def accept_list_end list
58
96
  @list_index.pop
59
97
  @list_type.pop
60
98
  @list_width.pop
61
99
  end
62
100
 
101
+ ##
102
+ # Finishes consumption of +list_item+
103
+
63
104
  def accept_list_item_end list_item
64
105
  width = case @list_type.last
65
106
  when :BULLET then
@@ -76,29 +117,29 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
76
117
  @indent -= width
77
118
  end
78
119
 
120
+ ##
121
+ # Prepares the visitor for consuming +list_item+
122
+
79
123
  def accept_list_item_start list_item
80
- bullet = case @list_type.last
81
- when :BULLET then
82
- '*'
83
- when :NOTE, :LABEL then
84
- attributes(list_item.label) + ":\n"
85
- else
86
- @list_index.last.to_s + '.'
87
- end
88
-
89
- case @list_type.last
124
+ type = @list_type.last
125
+
126
+ case type
90
127
  when :NOTE, :LABEL then
128
+ bullet = attributes(list_item.label) + ":\n"
129
+ @prefix = ' ' * @indent
91
130
  @indent += 2
92
- @prefix = bullet + (' ' * @indent)
131
+ @prefix << bullet + (' ' * @indent)
93
132
  else
133
+ bullet = type == :BULLET ? '*' : @list_index.last.to_s + '.'
94
134
  @prefix = (' ' * @indent) + bullet.ljust(bullet.length + 1)
95
-
96
135
  width = bullet.length + 1
97
-
98
136
  @indent += width
99
137
  end
100
138
  end
101
139
 
140
+ ##
141
+ # Prepares the visitor for consuming +list+
142
+
102
143
  def accept_list_start list
103
144
  case list.type
104
145
  when :BULLET then
@@ -123,14 +164,23 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
123
164
  @list_type << list.type
124
165
  end
125
166
 
167
+ ##
168
+ # Adds +paragraph+ to the output
169
+
126
170
  def accept_paragraph paragraph
127
171
  wrap attributes(paragraph.text)
128
172
  end
129
173
 
174
+ ##
175
+ # Adds +raw+ to the output
176
+
130
177
  def accept_raw raw
131
178
  @res << raw.parts.join("\n")
132
179
  end
133
180
 
181
+ ##
182
+ # Adds +rule+ to the output
183
+
134
184
  def accept_rule rule
135
185
  use_prefix or @res << ' ' * @indent
136
186
  @res << '-' * (@width - @indent)
@@ -138,58 +188,46 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
138
188
  end
139
189
 
140
190
  ##
141
- # Outputs +verbatim+ flush left and indented 2 columns
191
+ # Outputs +verbatim+ indented 2 columns
142
192
 
143
193
  def accept_verbatim verbatim
144
194
  indent = ' ' * (@indent + 2)
145
195
 
146
- lines = []
147
- current_line = []
148
-
149
- # split into lines
150
196
  verbatim.parts.each do |part|
151
- current_line << part
152
-
153
- if part == "\n" then
154
- lines << current_line
155
- current_line = []
156
- end
197
+ @res << indent unless part == "\n"
198
+ @res << part
157
199
  end
158
200
 
159
- lines << current_line unless current_line.empty?
160
-
161
- # calculate margin
162
- indented = lines.select { |line| line != ["\n"] }
163
- margin = indented.map { |line| line.first.length }.min
164
-
165
- # flush left
166
- indented.each { |line| line[0][0...margin] = '' }
167
-
168
- # output
169
- use_prefix or @res << indent # verbatim is unlikely to have prefix
170
- @res << lines.shift.join
171
-
172
- lines.each do |line|
173
- @res << indent unless line == ["\n"]
174
- @res << line.join
175
- end
176
-
177
- @res << "\n"
201
+ @res << "\n" unless @res =~ /\n\z/
178
202
  end
179
203
 
204
+ ##
205
+ # Applies attribute-specific markup to +text+ using RDoc::AttributeManager
206
+
180
207
  def attributes text
181
208
  flow = @am.flow text.dup
182
209
  convert_flow flow
183
210
  end
184
211
 
212
+ ##
213
+ # Returns the generated output
214
+
185
215
  def end_accepting
186
216
  @res.join
187
217
  end
188
218
 
219
+ ##
220
+ # Removes preceeding \\ from the suppressed crossref +special+
221
+
189
222
  def handle_special_SUPPRESSED_CROSSREF special
190
- special.text.sub(/\\/, '')
223
+ text = special.text
224
+ text = text.sub('\\', '') unless in_tt?
225
+ text
191
226
  end
192
227
 
228
+ ##
229
+ # Prepares the visitor for text generation
230
+
193
231
  def start_accepting
194
232
  @res = [""]
195
233
  @indent = 0
@@ -200,6 +238,10 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
200
238
  @list_width = []
201
239
  end
202
240
 
241
+ ##
242
+ # Adds the stored #prefix to the output and clears it. Lists generate a
243
+ # prefix for later consumption.
244
+
203
245
  def use_prefix
204
246
  prefix = @prefix
205
247
  @prefix = nil
@@ -208,6 +250,9 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
208
250
  prefix
209
251
  end
210
252
 
253
+ ##
254
+ # Wraps +text+ to #width
255
+
211
256
  def wrap text
212
257
  return unless text && !text.empty?
213
258
 
@@ -6,6 +6,8 @@ require 'rdoc/markup/formatter'
6
6
 
7
7
  class RDoc::Markup::ToTest < RDoc::Markup::Formatter
8
8
 
9
+ # :stopdoc:
10
+
9
11
  ##
10
12
  # :section: Visitor
11
13
 
@@ -22,8 +24,12 @@ class RDoc::Markup::ToTest < RDoc::Markup::Formatter
22
24
  @res << paragraph.text
23
25
  end
24
26
 
27
+ def accept_raw raw
28
+ @res << raw.parts.join
29
+ end
30
+
25
31
  def accept_verbatim(verbatim)
26
- @res << verbatim.text
32
+ @res << verbatim.text.gsub(/^(\S)/, ' \1')
27
33
  end
28
34
 
29
35
  def accept_list_start(list)
@@ -60,5 +66,7 @@ class RDoc::Markup::ToTest < RDoc::Markup::Formatter
60
66
  @res << '-' * rule.weight
61
67
  end
62
68
 
69
+ # :startdoc:
70
+
63
71
  end
64
72