1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
dave 2004-01-12 03:11:25 +00:00
parent 9ac4ebbf21
commit 16b7b1fb95
5 changed files with 39 additions and 9 deletions

View file

@ -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
######################################################################

View file

@ -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 }