diff --git a/lib/rdoc/token_stream.rb b/lib/rdoc/token_stream.rb index abf5fc0980..cc89397c60 100644 --- a/lib/rdoc/token_stream.rb +++ b/lib/rdoc/token_stream.rb @@ -15,8 +15,6 @@ module RDoc::TokenStream # with the given class names. Other token types are not wrapped in spans. def self.to_html(token_stream) - starting_title = false - token_stream.map do |t| next unless t @@ -47,15 +45,6 @@ def self.to_html(token_stream) text = t[:text] - if :on_ident == t[:kind] && starting_title - starting_title = false - style = 'ruby-identifier ruby-title' - end - - if :on_kw == t[:kind] and 'def' == t[:text] - starting_title = true - end - text = CGI.escapeHTML text if style then diff --git a/test/rdoc/markup/to_html_test.rb b/test/rdoc/markup/to_html_test.rb index 26d224eac2..820c8c2597 100644 --- a/test/rdoc/markup/to_html_test.rb +++ b/test/rdoc/markup/to_html_test.rb @@ -568,7 +568,7 @@ def bar expected = <<-'EXPECTED' -
def foo
+
def foo
   [
     '\\',
     '\'',
@@ -588,7 +588,7 @@ def bar
     /#{}/
   ]
 end
-def bar
+def bar
 end
 
EXPECTED @@ -618,7 +618,7 @@ def bar expected = <<-'EXPECTED' -
def foo
+
def foo
   [
     `\\`,
     `\'\"\``,
@@ -628,7 +628,7 @@ def bar
     `#{}`
   ]
 end
-def bar
+def bar
 end
 
EXPECTED @@ -702,7 +702,7 @@ def test_accept_verbatim_redefinable_operators %w[| ^ & <=> == === =~ > >= < <= << >> + - * / % ** ~ +@ -@ [] []= ` ! != !~].each do |html_escaped_op| expected += <<-EXPECTED -def #{html_escaped_op} +def #{html_escaped_op} end EXPECTED end