Skip to content

Commit 16c498c

Browse files
st0012kou
andauthored
Fix erb linting errors and remove unnecessary code (#1449)
Co-authored-by: Sutou Kouhei <[email protected]>
1 parent b92986a commit 16c498c

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

lib/rdoc/generator/template/darkfish/_head.rhtml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@
1616
<meta name="description" content="<%= h "#{file.page_name}: #{excerpt(file.comment)}" %>">
1717
<%- elsif @title %>
1818
<meta name="keywords" content="ruby,documentation,<%= h @title %>">
19-
20-
<%- if @options.main_page and
21-
main_page = @files.find { |f| f.full_name == @options.main_page } then %>
22-
<meta name="description" content="<%= h "#{@title}: #{excerpt(main_page.comment)}" %>">
23-
<%- else %>
24-
<meta name="description" content="Documentation for <%= h @title %>">
25-
<%- end %>
19+
<% description = @main_page ? "#{@title}: #{excerpt(@main_page.comment)}" : "Documentation for #{@title}" %>
20+
<meta name="description" content="<%= h description %>">
2621
<%- end %>
2722

2823
<%- if canonical_url = @options.canonical_root %>

lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<input id="search-field" role="combobox" aria-label="Search"
55
aria-autocomplete="list" aria-controls="search-results"
66
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
7+
autocomplete="off"
78
title="Type to search, Up and Down to navigate, Enter to load">
89
</div>
910

lib/rdoc/generator/template/darkfish/table_of_contents.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
unless table.empty? then %>
4848
<ul>
4949
<%- table.each do |item| %>
50-
<%- label = item.respond_to?(:label) ? item.label(klass) : item.aref %>
50+
<%- label = item.respond_to?(:label) ? item.label(klass) : item.aref %>
5151
<li><a href="<%= klass.path %>#<%= label %>"><%= item.plain_html %></a></li>
5252
<%- end %>
5353
</ul>

0 commit comments

Comments
 (0)