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

* lib/rdoc: Update to RDoc 3.9. Fixed ri [], stopdoc creating an

object reference, nodoc for class aliases, verbatim === lines.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-07-31 00:19:00 +00:00
parent 4ac69a57b5
commit 89b601d176
33 changed files with 1329 additions and 600 deletions

View file

@ -405,13 +405,19 @@ class RDoc::Markup::Parser
@line += 1
token
# === text => :HEADER then :TEXT
when s.scan(/(=+)\s*/) then
when s.scan(/(=+)(\s*)/) then
level = s[1].length
level = 6 if level > 6
@tokens << [:HEADER, level, *token_pos(pos)]
pos = s.pos
s.scan(/.*/)
[:TEXT, s.matched.sub(/\r$/, ''), *token_pos(pos)]
header = [:HEADER, level, *token_pos(pos)]
if s[2] =~ /^\r?\n/ then
s.pos -= s[2].length
header
else
pos = s.pos
s.scan(/.*/)
@tokens << header
[:TEXT, s.matched.sub(/\r$/, ''), *token_pos(pos)]
end
# --- (at least 3) and nothing else on the line => :RULE
when s.scan(/(-{3,}) *$/) then
[:RULE, s[1].length - 2, *token_pos(pos)]