diff options
Diffstat (limited to 'lib/rdoc/tom_doc.rb')
-rw-r--r-- | lib/rdoc/tom_doc.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/rdoc/tom_doc.rb b/lib/rdoc/tom_doc.rb index 625a6b5cfa..e161fcf42f 100644 --- a/lib/rdoc/tom_doc.rb +++ b/lib/rdoc/tom_doc.rb @@ -242,19 +242,18 @@ class RDoc::TomDoc < RDoc::Markup::Parser @tokens << case when @s.scan(/\r?\n/) then - token = [:NEWLINE, @s.matched, *token_pos(pos)] - @line_pos = char_pos @s.pos - @line += 1 + token = [:NEWLINE, @s.matched, *pos] + @s.newline! token when @s.scan(/(Examples|Signature)$/) then - @tokens << [:HEADER, 3, *token_pos(pos)] + @tokens << [:HEADER, 3, *pos] - [:TEXT, @s[1], *token_pos(pos)] + [:TEXT, @s[1], *pos] when @s.scan(/([:\w][\w\[\]]*)[ ]+- /) then - [:NOTE, @s[1], *token_pos(pos)] + [:NOTE, @s[1], *pos] else @s.scan(/.*/) - [:TEXT, @s.matched.sub(/\r$/, ''), *token_pos(pos)] + [:TEXT, @s.matched.sub(/\r$/, ''), *pos] end end |