summaryrefslogtreecommitdiffstats
path: root/lib/rdoc/parsers
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-20 15:02:57 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-20 15:02:57 +0000
commita8ae3685a90c15f612733ac68472d2d1427e0b0d (patch)
tree07dbf3a174284bb23462ce5109658ea56466207a /lib/rdoc/parsers
parent638bc8eb5003ba419ca7dda63f00eaa1f5299293 (diff)
downloadruby-a8ae3685a90c15f612733ac68472d2d1427e0b0d.tar.gz
ruby-a8ae3685a90c15f612733ac68472d2d1427e0b0d.tar.xz
ruby-a8ae3685a90c15f612733ac68472d2d1427e0b0d.zip
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: http://svn.ruby-lang.org/repos/ruby/trunk@7344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/parsers')
-rw-r--r--lib/rdoc/parsers/parse_rb.rb23
1 files changed, 5 insertions, 18 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index b8367b564..8f1206409 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