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

Import RDoc 3.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2010-12-28 22:08:56 +00:00
parent 90d5bcf910
commit e2efe8e81d
28 changed files with 494 additions and 56 deletions

View file

@ -224,9 +224,11 @@ class RDoc::Parser::Ruby < RDoc::Parser
##
# Look for a 'call-seq' in the comment, and override the normal parameter
# stuff
#--
# TODO handle undent
def extract_call_seq(comment, meth)
if comment.sub!(/:?call-seq:(.*?)^\s*\#?\s*$/m, '') then
if comment.sub!(/:?call-seq:(.*?)(^\s*#?\s*$|\z)/m, '') then
seq = $1
seq.gsub!(/^\s*\#\s*/, '')
meth.call_seq = seq
@ -779,6 +781,8 @@ class RDoc::Parser::Ruby < RDoc::Parser
@stats.add_attribute att
end
true
end
##
@ -1230,10 +1234,10 @@ class RDoc::Parser::Ruby < RDoc::Parser
if TkCOMMENT === tk then
if non_comment_seen then
# Look for RDoc in a comment about to be thrown away
parse_comment container, tk, comment unless comment.empty?
non_comment_seen = parse_comment container, tk, comment unless
comment.empty?
comment = ''
non_comment_seen = false
end
while TkCOMMENT === tk do
@ -1360,6 +1364,11 @@ class RDoc::Parser::Ruby < RDoc::Parser
return
end
else
non_comment_seen = parse_comment container, tk, comment unless
comment.empty?
comment = ''
end
comment = '' unless keep_comment