diff options
author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-20 15:02:57 +0000 |
---|---|---|
committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-20 15:02:57 +0000 |
commit | a80ba17d67141a51459bb89b1fb51e8b0a4ff2de (patch) | |
tree | 07dbf3a174284bb23462ce5109658ea56466207a /lib/rdoc/parsers | |
parent | aafc487d6a461d0a729432f919af0ee9645fcf14 (diff) |
1. Force --inline-source if --one-file given
2. Add new :section: directive which starts a new section in the output.
The title following :section: is used as the section heading, and the
remainder of the comment containing the section is used as
introductory text. Subsequent methods, aliases, attributes,
and classes will be documented in this section.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/parsers')
-rw-r--r-- | lib/rdoc/parsers/parse_rb.rb | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb index b8367b5641..8f1206409a 100644 --- a/lib/rdoc/parsers/parse_rb.rb +++ b/lib/rdoc/parsers/parse_rb.rb @@ -1580,23 +1580,6 @@ module RDoc non_comment_seen = true unless tk.kind_of?(TkCOMMENT) -# $stderr.puts "===== #{tk.inspect}" -# blank_line_seen = true -# while tk.kind_of?(TkNL) -# skip_tkspace(false) -# if peek_tk.kind_of?(TkCOMMENT) -# if blank_line_seen -# comment = '' -# blank_line_seen = false -# end -# tk = get_tk -# comment << tk.text << "\n" -# else -# blank_line_seen = true -# end -# tk = get_tk -# end - case tk when TkNL @@ -2326,6 +2309,10 @@ module RDoc options.title = param "" + when "section" + context.set_current_section(param, comment) + comment.clear + "" else warn "Unrecognized directive '#{directive}'" break @@ -2548,7 +2535,7 @@ module RDoc break when TkCOMMA else - warn("unexpected token: '#{tk.inspect}'") + warn("unexpected token: '#{tk2.inspect}'") if $DEBBUG break end end |