mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc*: Improved display of ChangeLog files as HTML.
* test/rdoc*: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fe6b2e20e9
commit
54c40f3db5
9 changed files with 136 additions and 14 deletions
|
@ -11,6 +11,12 @@ class RDoc::Markup::Document
|
|||
|
||||
attr_reader :file
|
||||
|
||||
##
|
||||
# If a heading is below the given level it will be omitted from the
|
||||
# table_of_contents
|
||||
|
||||
attr_accessor :omit_headings_below
|
||||
|
||||
##
|
||||
# The parts of the Document
|
||||
|
||||
|
@ -24,6 +30,7 @@ class RDoc::Markup::Document
|
|||
@parts.concat parts
|
||||
|
||||
@file = nil
|
||||
@omit_headings_from_table_of_contents_below = nil
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -57,14 +64,7 @@ class RDoc::Markup::Document
|
|||
def accept visitor
|
||||
visitor.start_accepting
|
||||
|
||||
@parts.each do |item|
|
||||
case item
|
||||
when RDoc::Markup::Document then # HACK
|
||||
visitor.accept_document item
|
||||
else
|
||||
item.accept visitor
|
||||
end
|
||||
end
|
||||
visitor.accept_document self
|
||||
|
||||
visitor.end_accepting
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue