diff options
| author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-12 03:11:25 +0000 |
|---|---|---|
| committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-12 03:11:25 +0000 |
| commit | fd98cdb6ab411752b0d869a0dcda2030158ca8ad (patch) | |
| tree | 8bda456cba31f51a88116550f8fea54043c8e6cf /lib/rdoc/ri | |
| parent | c836c850e210b6a58f335bc2e9fa14c72668ec64 (diff) | |
| download | ruby-fd98cdb6ab411752b0d869a0dcda2030158ca8ad.tar.gz ruby-fd98cdb6ab411752b0d869a0dcda2030158ca8ad.tar.xz ruby-fd98cdb6ab411752b0d869a0dcda2030158ca8ad.zip | |
Add explicit line breaks in method signatures for ri. Fixup some comments in object.c. Support changes comments for "in xxx.c"
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri')
| -rw-r--r-- | lib/rdoc/ri/ri_display.rb | 5 | ||||
| -rw-r--r-- | lib/rdoc/ri/ri_formatter.rb | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/lib/rdoc/ri/ri_display.rb b/lib/rdoc/ri/ri_display.rb index 6899fe165..8533aba82 100644 --- a/lib/rdoc/ri/ri_display.rb +++ b/lib/rdoc/ri/ri_display.rb @@ -237,7 +237,10 @@ class DefaultDisplay params = method.name + params end end - params.split(/\n/).each {|p| @formatter.wrap(p) } + params.split(/\n/).each do |p| + @formatter.wrap(p) + @formatter.break_to_newline + end end ###################################################################### diff --git a/lib/rdoc/ri/ri_formatter.rb b/lib/rdoc/ri/ri_formatter.rb index f4ea7cb04..07439b93f 100644 --- a/lib/rdoc/ri/ri_formatter.rb +++ b/lib/rdoc/ri/ri_formatter.rb @@ -68,6 +68,15 @@ module RI ###################################################################### + # called when we want to ensure a nbew 'wrap' starts on a newline + # Only needed for HtmlFormatter, because the rest do their + # own line breaking + + def break_to_newline + end + + ###################################################################### + def bold_print(txt) print txt end @@ -459,14 +468,13 @@ module RI print(escape(achar.char)) end update_attributes(curr_attr, 0) unless curr_attr.zero? - puts end def draw_line(label=nil) if label != nil bold_print(label) end - puts("<hr /><p />") + puts("<hr>") end def bold_print(txt) @@ -477,6 +485,10 @@ module RI puts("<p>") end + def break_to_newline + puts("<br>") + end + def display_heading(text, level, indent) level = 4 if level > 4 tag("h#{level}") { text } |
