summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-01 05:25:13 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-01 05:25:13 +0000
commita429cafc4d95c0543e3fb234f1762067ee0b5304 (patch)
treead85881029b8ca877890dd66f23bccd46af04181 /lib
parent7d2efc1fdaa0251ae8ceb8e437ade37e8b2a28fa (diff)
* lib/rdoc.rb: Import RDoc 3.9.1. Fixes bugs in the RDoc::Markup
parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc.rb2
-rw-r--r--lib/rdoc/markup/parser.rb17
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb2
-rw-r--r--lib/rdoc/text.rb2
4 files changed, 15 insertions, 8 deletions
diff --git a/lib/rdoc.rb b/lib/rdoc.rb
index e05e22a3a1..86c194f8ba 100644
--- a/lib/rdoc.rb
+++ b/lib/rdoc.rb
@@ -104,7 +104,7 @@ module RDoc
##
# RDoc version you are using
- VERSION = '3.9'
+ VERSION = '3.9.1'
##
# Method visibilities
diff --git a/lib/rdoc/markup/parser.rb b/lib/rdoc/markup/parser.rb
index 3ab72ee5d5..c18ce821fb 100644
--- a/lib/rdoc/markup/parser.rb
+++ b/lib/rdoc/markup/parser.rb
@@ -86,11 +86,18 @@ class RDoc::Markup::Parser
# Builds a Heading of +level+
def build_heading level
- _, text, = get # TEXT
- heading = RDoc::Markup::Heading.new level, text
- skip :NEWLINE
-
- heading
+ type, text, = get
+
+ text = case type
+ when :TEXT then
+ skip :NEWLINE
+ text
+ else
+ unget
+ ''
+ end
+
+ RDoc::Markup::Heading.new level, text
end
##
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb
index 5175b79192..450ea960b5 100644
--- a/lib/rdoc/markup/to_html_crossref.rb
+++ b/lib/rdoc/markup/to_html_crossref.rb
@@ -97,7 +97,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
# RDoc::Markup::ToHtml to handle other schemes.
def gen_url url, text
- super unless url =~ /\Ardoc-ref:/
+ return super unless url =~ /\Ardoc-ref:/
cross_reference $', text
end
diff --git a/lib/rdoc/text.rb b/lib/rdoc/text.rb
index aec334b545..3ac55ed560 100644
--- a/lib/rdoc/text.rb
+++ b/lib/rdoc/text.rb
@@ -126,7 +126,7 @@ Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} #{RUBY_RELEASE_DATE}
Please file a bug report with the above information at:
-http://rubyforge.org/tracker/?atid=2472&group_id=627&func=browse
+https://github.com/rdoc/rdoc/issues
EOF
raise