From 63f306671e61891a4ff8bf048f5dd5efbee0baf6 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 14 Nov 2025 10:28:06 +0800 Subject: [PATCH 1/2] Fix erb linting errors and remove unused code --- lib/rdoc/generator/template/darkfish/_head.rhtml | 9 ++------- .../generator/template/darkfish/_sidebar_search.rhtml | 1 + .../generator/template/darkfish/table_of_contents.rhtml | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml index eeae0acb03..c90635877a 100644 --- a/lib/rdoc/generator/template/darkfish/_head.rhtml +++ b/lib/rdoc/generator/template/darkfish/_head.rhtml @@ -16,13 +16,8 @@ "> <%- elsif @title %> - - <%- if @options.main_page and - main_page = @files.find { |f| f.full_name == @options.main_page } then %> - "> - <%- else %> - - <%- end %> +<% description = @main_page ? "#{@title}: #{excerpt(@main_page.comment)}" : "Documentation for #{@title}" %> + <%- end %> <%- if canonical_url = @options.canonical_root %> diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml index afc7f7b88d..c41d9990cf 100644 --- a/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +++ b/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml @@ -4,6 +4,7 @@ diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml index 7cd8da15d9..6b7d749705 100644 --- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml @@ -47,7 +47,7 @@ unless table.empty? then %> From 814fac2de6f1eb83b1740394d335b2f379e6e450 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 14 Nov 2025 11:17:30 +0800 Subject: [PATCH 2/2] Update lib/rdoc/generator/template/darkfish/table_of_contents.rhtml Co-authored-by: Sutou Kouhei --- lib/rdoc/generator/template/darkfish/table_of_contents.rhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml index 6b7d749705..45d57ce837 100644 --- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml @@ -47,7 +47,7 @@ unless table.empty? then %>
    <%- table.each do |item| %> -<%- label = item.respond_to?(:label) ? item.label(klass) : item.aref %> + <%- label = item.respond_to?(:label) ? item.label(klass) : item.aref %>
  • <%= item.plain_html %>
  • <%- end %>