This method is deprecated or moved on the latest stable version.
The last existing version (v1_8_7_330) is shown here.
find_comments(text)
private
Comments just after module or subprogram, or arguments are returned. If
“COMMENTS_ARE_UPPER” is true, comments just before modules or
subprograms are returned
# File lib/rdoc/parsers/parse_f95.rb, line 1151
def find_comments text
return "" unless text
lines = text.split("\n")
lines.reverse! if COMMENTS_ARE_UPPER
comment_block = Array.new
lines.each do |line|
break if line =~ /^\s*?\w/ || line =~ /^\s*?$/
if COMMENTS_ARE_UPPER
comment_block.unshift line.sub(/^\s*?!\s?/,"")
else
comment_block.push line.sub(/^\s*?!\s?/,"")
end
end
nice_lines = comment_block.join("\n").split "\n\s*?\n"
nice_lines[0] ||= ""
nice_lines.shift
end