File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
lib/rdoc/generator/template/darkfish Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 3636 unless table . empty? then %>
3737 < ul >
3838<%- table . each do |item | -%>
39- < li > < a href ="<%= klass . path %> # <%= item . aref %> "> <%= item . plain_html %> </ a >
39+ < li > < a href ="<%= klass . path %> # <%= item . label ( klass ) %> "> <%= item . plain_html %> </ a >
4040<%- end -%>
4141 </ ul >
4242<%- end -%>
Original file line number Diff line number Diff line change @@ -113,7 +113,9 @@ def test_generate
113113 refute_match ( /Ignored/ , File . binread ( 'index.html' ) )
114114 summary = File . binread ( 'index.html' ) [ %r[<summary.*Klass\. html.*</summary>.*</details>]m ]
115115 assert_match ( %r[Klass/Inner\. html".*>Inner<] , summary )
116- klassnav = File . binread ( 'Klass.html' ) [ %r[<div class="nav-section">.*<div id="class-metadata">]m ]
116+
117+ klass = File . binread ( 'Klass.html' )
118+ klassnav = klass [ %r[<div class="nav-section">.*<div id="class-metadata">]m ]
117119 assert_match (
118120 %r[<li>\s *<details open>\s *<summary>\s *<a href=\S +>Heading 1</a>\s *</summary>\s *<ul]m ,
119121 klassnav
@@ -122,6 +124,14 @@ def test_generate
122124 %r[<li>\s *<a href=\S +>Heading 1.1.1.1</a>\s *</ul>\s *</details>\s *</li>]m ,
123125 klassnav
124126 )
127+
128+ assert_match ( /<h1 id="class-Klass-label-Heading\+ 1">Heading 1(?!\. )/ ,
129+ klass [ %r[<section class=\" description\" >.*</section>]m ] )
130+ toc = File . binread ( 'table_of_contents.html' )
131+ assert_match (
132+ %r[<a\s +href="Klass\. html#class-Klass-label-Heading\+ 1">Heading 1</a>]m ,
133+ toc [ %r[<h2\s +id=\" classes\" >.*(?=<h2\b )]m ] [ %r[<a\s +href="Klass\. html".*(?=</li\b )]m ]
134+ )
125135 end
126136
127137 def test_generate_page
You can’t perform that action at this time.
0 commit comments