File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -339,15 +339,19 @@ def next_token # :nodoc:
339
339
# non-RD part begin
340
340
when /^=begin\s+(\w+)/
341
341
part = $1
342
+ =begin # not imported to RDoc
342
343
if @in_part # if in non-RD part
343
344
@part_content.push(line)
344
345
else
345
346
@in_part = part if @tree.filter[part] # if filter exists
346
347
# p "BEGIN_PART: #{@in_part}" # DEBUG
347
348
end
349
+ =end
350
+ @in_part = part
348
351
# non-RD part end
349
352
when /^=end/
350
353
if @in_part # if in non-RD part
354
+ =begin # not imported to RDoc
351
355
# p "END_PART: #{@in_part}" # DEBUG
352
356
# make Part-in object
353
357
part = RDoc::RD::Part.new(@part_content.join(""), @tree, "r")
@@ -366,11 +370,14 @@ def next_token # :nodoc:
366
370
end
367
371
@in_part = nil
368
372
return [:SUBTREE, subtree]
373
+ =end
369
374
end
370
375
else
376
+ =begin # not imported to RDoc
371
377
if @in_part # if in non-RD part
372
378
@part_content.push(line)
373
379
end
380
+ =end
374
381
end
375
382
end
376
383
Original file line number Diff line number Diff line change @@ -168,6 +168,27 @@ def test_parse_include_subtree
168
168
tf . close!
169
169
end
170
170
171
+ =begin
172
+ def test_parse_include_other_format
173
+ @block_parser.include_path = [Dir.tmpdir]
174
+
175
+ expected =
176
+ doc(
177
+ blank_line,
178
+ para("include ((*worked*))"),
179
+ blank_line,
180
+ blank_line)
181
+
182
+ str = <<~STR
183
+ =begin nonrd
184
+ <<< worked
185
+ =end
186
+ STR
187
+
188
+ assert_equal ( expected , @block_parser . parse str . lines . to_a )
189
+ end
190
+ = end
191
+
171
192
def test_parse_heading
172
193
assert_equal doc ( head ( 1 , "H" ) ) , parse ( "= H" )
173
194
assert_equal doc ( head ( 2 , "H" ) ) , parse ( "== H" )
You can’t perform that action at this time.
0 commit comments