diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-27 01:30:18 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-27 01:30:18 +0000 |
commit | 95e213d3542034e0fd2613de6990a7ddfe5718ca (patch) | |
tree | 76ec64fccb338dbcbc4d3f07c2f494ef9b7fe1ff /lib/rdoc/tom_doc.rb | |
parent | 41fb243684f60e231fc77ec54752fe4e844523d5 (diff) |
Merge rdoc-6.1.0.beta1.
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/tom_doc.rb')
-rw-r--r-- | lib/rdoc/tom_doc.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/rdoc/tom_doc.rb b/lib/rdoc/tom_doc.rb index 2b594b7d84..625a6b5cfa 100644 --- a/lib/rdoc/tom_doc.rb +++ b/lib/rdoc/tom_doc.rb @@ -180,12 +180,19 @@ class RDoc::TomDoc < RDoc::Markup::Parser case type when :TEXT then - @section = 'Returns' if data =~ /\AReturns/ + @section = 'Returns' if data =~ /\A(Returns|Raises)/ paragraph << data when :NEWLINE then if :TEXT == peek_token[0] then - paragraph << ' ' + # Lines beginning with 'Raises' in the Returns section should not be + # treated as multiline text + if 'Returns' == @section and + peek_token[1].start_with?('Raises') then + break + else + paragraph << ' ' + end else break end @@ -255,4 +262,3 @@ class RDoc::TomDoc < RDoc::Markup::Parser end end - |