@@ -510,7 +510,7 @@ def add_extension_modules_multiple out, store, modules # :nodoc:
510
510
with . each do |incl |
511
511
out << RDoc ::Markup ::Paragraph . new ( incl . name )
512
512
out << RDoc ::Markup ::BlankLine . new
513
- out << incl . comment
513
+ out << incl . comment . parse
514
514
end
515
515
516
516
unless wout . empty? then
@@ -534,7 +534,7 @@ def add_extension_modules_single out, store, include # :nodoc:
534
534
535
535
if include . comment then
536
536
out << RDoc ::Markup ::BlankLine . new
537
- out << include . comment
537
+ out << include . comment . parse
538
538
end
539
539
end
540
540
@@ -651,12 +651,12 @@ def class_document name, found, klasses, includes, extends
651
651
##
652
652
# Adds the class +comment+ to +out+.
653
653
654
- def class_document_comment out , comment # :nodoc:
655
- unless comment . empty? then
654
+ def class_document_comment out , document # :nodoc:
655
+ unless document . empty? then
656
656
out << RDoc ::Markup ::Rule . new ( 1 )
657
657
658
- if comment . merged? then
659
- parts = comment . parts
658
+ if document . merged? then
659
+ parts = document . parts
660
660
parts = parts . zip [ RDoc ::Markup ::BlankLine . new ] * parts . length
661
661
parts . flatten!
662
662
parts . pop
@@ -681,7 +681,7 @@ def class_document_constants out, klass # :nodoc:
681
681
constants = klass . constants . sort_by { |constant | constant . name }
682
682
683
683
list . items . concat constants . map { |constant |
684
- parts = constant . comment . parts if constant . comment
684
+ parts = constant . comment . parse . parts
685
685
parts << RDoc ::Markup ::Paragraph . new ( '[not documented]' ) if
686
686
parts . empty?
687
687
@@ -898,7 +898,7 @@ def display_page name
898
898
899
899
page = store . load_page page_name
900
900
901
- display page . comment
901
+ display page . comment . parse
902
902
end
903
903
904
904
##
@@ -1199,7 +1199,8 @@ def load_method store, cache, klass, type, name
1199
1199
1200
1200
store . load_method klass , "#{ type } #{ method } "
1201
1201
rescue RDoc ::Store ::MissingFileError => e
1202
- comment = RDoc ::Comment . new ( "missing documentation at #{ e . file } " ) . parse
1202
+ comment = RDoc ::Comment . new ( "missing documentation at #{ e . file } " )
1203
+ comment . parse
1203
1204
1204
1205
method = RDoc ::AnyMethod . new nil , name
1205
1206
method . comment = comment
@@ -1361,21 +1362,21 @@ def parse_name name
1361
1362
# documentable items the class is added to +also_in+ instead.
1362
1363
1363
1364
def render_class out , store , klass , also_in # :nodoc:
1364
- comment = klass . comment
1365
+ document = klass . comment . parse
1365
1366
# TODO the store's cache should always return an empty Array
1366
1367
class_methods = store . class_methods [ klass . full_name ] || [ ]
1367
1368
instance_methods = store . instance_methods [ klass . full_name ] || [ ]
1368
1369
attributes = store . attributes [ klass . full_name ] || [ ]
1369
1370
1370
- if comment . empty? and
1371
+ if document . empty? and
1371
1372
instance_methods . empty? and class_methods . empty? then
1372
1373
also_in << store
1373
1374
return
1374
1375
end
1375
1376
1376
1377
add_from out , store
1377
1378
1378
- class_document_comment out , comment
1379
+ class_document_comment out , document
1379
1380
1380
1381
if class_methods or instance_methods or not klass . constants . empty? then
1381
1382
out << RDoc ::Markup ::Rule . new ( 1 )
@@ -1423,16 +1424,16 @@ def render_method_comment out, method, alias_for = nil# :nodoc:
1423
1424
if alias_for
1424
1425
unless method . comment . nil? or method . comment . empty?
1425
1426
out << RDoc ::Markup ::BlankLine . new
1426
- out << method . comment
1427
+ out << method . comment . parse
1427
1428
end
1428
1429
out << RDoc ::Markup ::BlankLine . new
1429
1430
out << RDoc ::Markup ::Paragraph . new ( "(This method is an alias for #{ alias_for . full_name } .)" )
1430
1431
out << RDoc ::Markup ::BlankLine . new
1431
- out << alias_for . comment
1432
+ out << alias_for . comment . parse
1432
1433
out << RDoc ::Markup ::BlankLine . new
1433
1434
else
1434
1435
out << RDoc ::Markup ::BlankLine . new
1435
- out << method . comment
1436
+ out << method . comment . parse
1436
1437
out << RDoc ::Markup ::BlankLine . new
1437
1438
end
1438
1439
end
0 commit comments