mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
Sync RDoc 6.14.0
This commit is contained in:
parent
ca1ea95784
commit
03eb777c69
185 changed files with 2008 additions and 1655 deletions
|
@ -75,7 +75,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
|
|||
#
|
||||
# Returns an RDoc::Markup::Document representing the TomDoc format.
|
||||
|
||||
def self.parse text
|
||||
def self.parse(text)
|
||||
parser = new
|
||||
|
||||
parser.tokenize text
|
||||
|
@ -91,7 +91,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
|
|||
#
|
||||
# Returns a String containing the signature and nil if not
|
||||
|
||||
def self.signature comment
|
||||
def self.signature(comment)
|
||||
return unless comment.tomdoc?
|
||||
|
||||
document = comment.parse
|
||||
|
@ -134,7 +134,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
|
|||
#
|
||||
# Returns an RDoc::Markup::Heading
|
||||
|
||||
def build_heading level
|
||||
def build_heading(level)
|
||||
heading = super
|
||||
|
||||
@section = heading.text
|
||||
|
@ -150,7 +150,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
|
|||
#
|
||||
# Returns an RDoc::Markup::Verbatim
|
||||
|
||||
def build_verbatim margin
|
||||
def build_verbatim(margin)
|
||||
verbatim = super
|
||||
|
||||
verbatim.format = :ruby if @section == 'Examples'
|
||||
|
@ -164,7 +164,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
|
|||
#
|
||||
# Returns an RDoc::Markup::Paragraph.
|
||||
|
||||
def build_paragraph margin
|
||||
def build_paragraph(margin)
|
||||
p :paragraph_start => margin if @debug
|
||||
|
||||
paragraph = RDoc::Markup::Paragraph.new
|
||||
|
@ -204,7 +204,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
|
|||
##
|
||||
# Detects a section change to "Returns" and adds a heading
|
||||
|
||||
def parse_text parent, indent # :nodoc:
|
||||
def parse_text(parent, indent) # :nodoc:
|
||||
paragraph = build_paragraph indent
|
||||
|
||||
if false == @seen_returns and 'Returns' == @section then
|
||||
|
@ -222,7 +222,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
|
|||
#
|
||||
# Returns self.
|
||||
|
||||
def tokenize text
|
||||
def tokenize(text)
|
||||
text = text.sub(/\A(Public|Internal|Deprecated):\s+/, '')
|
||||
|
||||
setup_scanner text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue