Skip to content

Commit 0280c09

Browse files
committed
Fix Herb linter issues
1 parent 6048c40 commit 0280c09

File tree

10 files changed

+260
-289
lines changed

10 files changed

+260
-289
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<footer role="contentinfo">
2-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> <%= RDoc::VERSION %>. <a href="https://validator.w3.org/check/referer">Validate</a>
3-
<p><a href="http://rorvswild.com/theme">RoRvsWild theme</a> based on <a href="http://deveiate.org">Darkfish</a>.
4-
</footer>
2+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> <%= RDoc::VERSION %>. <a href="https://validator.w3.org/check/referer">Validate</a></p>
3+
<p><a href="http://rorvswild.com/theme">RoRvsWild theme</a> based on <a href="http://deveiate.org">Darkfish</a>.</p>
4+
</footer>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<meta charset="<%= @options.charset %>">
2-
<meta name="viewport" content="width=device-width, initial-scale=1" />
2+
<meta name="viewport" content="width=device-width, initial-scale=1">
33

44
<title><%= h @title %></title>
55

@@ -20,6 +20,6 @@
2020

2121
<link href="<%= h asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
2222
<link href="<%= h asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
23-
<%- @options.template_stylesheets.each do |stylesheet| -%>
24-
<link href="<%= h asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
25-
<%- end -%>
23+
<%- @options.template_stylesheets.each do |stylesheet| %>
24+
<link href="<%= h asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
25+
<%- end %>

lib/rdoc/generator/template/rorvswild/_navigation.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
<%= render '_sidebar_classes.rhtml' %>
33
<%= render '_sidebar_pages.rhtml' %>
44
<%= render '_footer.rhtml' %>
5-
</nav>
5+
</nav>

lib/rdoc/generator/template/rorvswild/class.rhtml

Lines changed: 125 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -3,175 +3,154 @@
33
<div class="wrapper">
44
<%= render '_navigation.rhtml' %>
55

6-
<main role="main" aria-labelledby="<%=h klass.aref %>">
6+
<main role="main" aria-labelledby="<%= h klass.aref %>">
77
<article>
8-
<h1 id="<%=h klass.aref %>">
8+
<h1 id="<%= h klass.aref %>">
99
<%= klass.type %> <%= klass.full_name %>
1010
</h1>
1111

1212
<%= klass.description %>
1313

14-
<%- klass.each_section do |section, constants, attributes| -%>
14+
<%- klass.each_section do |section, constants, attributes| %>
1515

16-
<%- if section.title then -%>
17-
<h2><%= section.title %></h2>
18-
<%- end -%>
16+
<%- if section.title then %>
17+
<h2><%= section.title %></h2>
18+
<%- end %>
1919

20-
<%- if section.comment then -%>
21-
<div><%= section.description %></div>
22-
<%- end -%>
20+
<%- if section.comment then %>
21+
<div><%= section.description %></div>
22+
<%- end %>
2323

24-
<%- unless constants.empty? then -%>
25-
<section class="constants-list">
26-
<header>
27-
<h2>Constants</h2>
28-
</header>
29-
<dl>
30-
<%- constants.each do |const| -%>
31-
<dt id="<%= const.name %>"><%= const.name %></dt>
32-
<%- if const.comment then -%>
33-
<dd>
34-
<!-- commented future feature
35-
<%#- if const.mixin_from then -%>
36-
<div class="mixin-from">
37-
Included from <a href="<%#= klass.aref_to(const.mixin_from.path)%>"><%#= const.mixin_from.full_name %></a>
38-
</div>
39-
<%#- end -%>
40-
-->
41-
<%= const.description.strip %>
42-
</dd>
43-
<%- else -%>
44-
<dd class="missing-docs">(Not documented)</dd>
45-
<%- end -%>
46-
<%- end -%>
47-
</dl>
48-
</section>
49-
<%- end -%>
24+
<%- unless constants.empty? then %>
25+
<section class="constants-list">
26+
<header>
27+
<h2>Constants</h2>
28+
</header>
29+
<dl>
30+
<%- constants.each do |const| %>
31+
<dt id="<%= const.name %>"><%= const.name %></dt>
32+
<%- if const.comment then %>
33+
<dd>
34+
<%= const.description.strip %>
35+
</dd>
36+
<%- else %>
37+
<dd class="missing-docs">(Not documented)</dd>
38+
<%- end %>
39+
<%- end %>
40+
</dl>
41+
</section>
42+
<%- end %>
5043

51-
<%- unless attributes.empty? then -%>
52-
<section class="attribute-method-details" class="method-section">
53-
<header>
54-
<h2>Attributes</h2>
55-
</header>
56-
<%- attributes.each do |attrib| -%>
57-
<div id="<%= attrib.aref %>" class="method-detail">
58-
<div class="method-heading attribute-method-heading">
59-
<a href="#<%= attrib.aref %>" title="Link to this attribute">
60-
<span class="method-name"><%= h attrib.name %></span>
61-
<span class="attribute-access-type">[<%= attrib.rw %>]</span>
62-
</a>
63-
</div>
44+
<%- unless attributes.empty? then %>
45+
<section class="attribute-method-details method-section">
46+
<header>
47+
<h2>Attributes</h2>
48+
</header>
49+
<%- attributes.each do |attrib| %>
50+
<div id="<%= attrib.aref %>" class="method-detail">
51+
<div class="method-heading attribute-method-heading">
52+
<a href="#<%= attrib.aref %>" title="Link to this attribute">
53+
<span class="method-name"><%= h attrib.name %></span>
54+
<span class="attribute-access-type">[<%= attrib.rw %>]</span>
55+
</a>
56+
</div>
6457

65-
<div class="method-description">
66-
<!-- commented future feature
67-
<%#- if attrib.mixin_from then -%>
68-
<div class="mixin-from">
69-
<%#= attrib.singleton ? "Extended" : "Included" %> from <a href="<%#= klass.aref_to(attrib.mixin_from.path)%>"><%#= attrib.mixin_from.full_name %></a>
70-
</div>
71-
<%#- end -%>
72-
-->
73-
<%- if attrib.comment then -%>
74-
<%= attrib.description.strip %>
75-
<%- else -%>
76-
<p class="missing-docs">(Not documented)</p>
77-
<%- end -%>
78-
</div>
58+
<div class="method-description">
59+
<%- if attrib.comment then %>
60+
<%= attrib.description.strip %>
61+
<%- else %>
62+
<p class="missing-docs">(Not documented)</p>
63+
<%- end %>
7964
</div>
80-
<%- end -%>
81-
</section>
82-
<%- end -%>
65+
</div>
66+
<%- end %>
67+
</section>
68+
<%- end %>
8369

84-
<%- klass.methods_by_type(section).each do |type, visibilities|
85-
next if visibilities.empty?
86-
visibilities.each do |visibility, methods|
87-
next if methods.empty? %>
88-
<section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section">
89-
<header>
90-
<h2><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h2>
91-
</header>
70+
<%- klass.methods_by_type(section).each do |type, visibilities|
71+
next if visibilities.empty?
72+
visibilities.each do |visibility, methods|
73+
next if methods.empty? %>
74+
<section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section">
75+
<header>
76+
<h2><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h2>
77+
</header>
9278

93-
<%- methods.each do |method| -%>
94-
<div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
95-
<div class="method-header">
96-
<%- if (call_seq = method.call_seq) then -%>
97-
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
98-
<div class="method-heading">
99-
<a href="#<%= method.aref %>" title="Link to this method">
100-
<span class="method-callseq">
101-
<%= h(call_seq.strip.
102-
gsub( /^\w+\./m, '')).
103-
gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
104-
</span>
105-
</a>
106-
</div>
107-
<%- end -%>
108-
<%- elsif method.has_call_seq? then -%>
79+
<%- methods.each do |method| %>
80+
<div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
81+
<div class="method-header">
82+
<%- if (call_seq = method.call_seq) then %>
83+
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
10984
<div class="method-heading">
11085
<a href="#<%= method.aref %>" title="Link to this method">
111-
<span class="method-name"><%= h method.name %></span>
86+
<span class="method-callseq">
87+
<%= h(call_seq.strip.
88+
gsub( /^\w+\./m, '')).
89+
gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
90+
</span>
11291
</a>
11392
</div>
114-
<%- else -%>
115-
<div class="method-heading">
116-
<a href="#<%= method.aref %>" title="Link to this method">
117-
<span class="method-name"><%= h method.name %></span>
118-
<span class="method-args"><%= h method.param_seq %></span>
119-
</a>
93+
<%- end %>
94+
<%- elsif method.has_call_seq? then %>
95+
<div class="method-heading">
96+
<a href="#<%= method.aref %>" title="Link to this method">
97+
<span class="method-name"><%= h method.name %></span>
98+
</a>
99+
</div>
100+
<%- else %>
101+
<div class="method-heading">
102+
<a href="#<%= method.aref %>" title="Link to this method">
103+
<span class="method-name"><%= h method.name %></span>
104+
<span class="method-args"><%= h method.param_seq %></span>
105+
</a>
106+
</div>
107+
<%- end %>
108+
</div>
109+
110+
<%- unless method.skip_description? then %>
111+
<div class="method-description">
112+
<%- if method.comment then %>
113+
<%= method.description.strip %>
114+
<%- else %>
115+
<p class="missing-docs">(Not documented)</p>
116+
<%- end %>
117+
<%- if method.calls_super then %>
118+
<div class="method-calls-super">
119+
Calls superclass method <%= method.superclass_method ? method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil %>
120120
</div>
121-
<%- end -%>
121+
<%- end %>
122+
<%- if method.token_stream then %>
123+
<button class="toggle-source">toggle source</button>
124+
<div class="method-source-code" id="<%= method.html_name %>-source">
125+
<pre><%= method.markup_code %></pre>
126+
</div>
127+
<%- end %>
122128
</div>
129+
<%- end %>
123130

124-
<%- unless method.skip_description? then -%>
125-
<div class="method-description">
126-
<!-- commented future feature
127-
<%#- if method.mixin_from then -%>
128-
<div class="mixin-from">
129-
<%#= method.singleton ? "Extended" : "Included" %> from <a href="<%#= klass.aref_to(method.mixin_from.path)%>"><%#= method.mixin_from.full_name %></a>
130-
</div>
131-
<%#- end -%>
132-
-->
133-
<%- if method.comment then -%>
134-
<%= method.description.strip %>
135-
<%- else -%>
136-
<p class="missing-docs">(Not documented)</p>
137-
<%- end -%>
138-
<%- if method.calls_super then -%>
139-
<div class="method-calls-super">
140-
Calls superclass method <%= method.superclass_method ? method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil %>
141-
</div>
142-
<%- end -%>
143-
<%- if method.token_stream then -%>
144-
<button class="toggle-source">toggle source</button>
145-
<div class="method-source-code" id="<%= method.html_name %>-source">
146-
<pre><%= method.markup_code %></pre>
147-
</div>
148-
<%- end -%>
149-
</div>
150-
<%- end -%>
151-
152-
<%- unless method.aliases.empty? then -%>
153-
<div class="aliases">
154-
Also aliased as: <%= method.aliases.map do |aka|
155-
if aka.parent then # HACK lib/rexml/encodings
156-
%{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>}
157-
else
158-
h aka.name
159-
end
160-
end.join ", " %>
161-
</div>
162-
<%- end -%>
131+
<%- unless method.aliases.empty? then %>
132+
<div class="aliases">
133+
Also aliased as: <%= method.aliases.map do |aka|
134+
if aka.parent then # HACK lib/rexml/encodings
135+
%{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>}
136+
else
137+
h aka.name
138+
end
139+
end.join ", " %>
140+
</div>
141+
<%- end %>
163142

164-
<%- if method.is_alias_for then -%>
165-
<div class="aliases">
166-
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
167-
</div>
168-
<%- end -%>
169-
</div>
170-
<%- end -%>
171-
</section>
172-
<%- end
143+
<%- if method.is_alias_for then %>
144+
<div class="aliases">
145+
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
146+
</div>
147+
<%- end %>
148+
</div>
149+
<%- end %>
150+
</section>
151+
<%- end
173152
end %>
174-
<%- end -%>
153+
<%- end %>
175154
</article>
176155
<nav class="contextual">
177156
<%= render '_sidebar_parent.rhtml' %>

lib/rdoc/generator/template/rorvswild/index.rhtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<article>
88
<%- if @options.main_page and
99
main_page = @files.find { |f| f.full_name == @options.main_page } then %>
10-
<%- current = main_page -%>
10+
<%- current = main_page %>
1111
<%= main_page.description %>
12-
<%- else -%>
13-
<p>This is the API documentation for <%= h @title %>.
14-
<%- end -%>
12+
<%- else %>
13+
<p>This is the API documentation for <%= h @title %>.</p>
14+
<%- end %>
1515
</article>
1616

1717
<nav class="contextual">
18-
<%= render '_sidebar_table_of_contents.rhtml' if current %>
18+
<%= render '_sidebar_table_of_contents.rhtml' if current %>
1919
</nav>
2020
</main>
2121
</div>

lib/rdoc/generator/template/rorvswild/page.rhtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="wrapper">
44
<%= render '_navigation.rhtml' %>
55

6-
<main role="main" aria-label="Page <%=h file.full_name%>">
6+
<main role="main" aria-label="Page <%= h file.full_name %>">
77
<article>
88
<%= file.description %>
99
</article>
@@ -12,4 +12,4 @@
1212
</nav>
1313
</main>
1414
</div>
15-
</body>
15+
</body>
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<body role="document">
2-
<%= render '_sidebar_toggle.rhtml' %>
2+
<%= render '_sidebar_toggle.rhtml' %>
33

4-
<nav id="navigation" role="navigation">
5-
<%= render '_sidebar_pages.rhtml' %>
6-
<%= render '_sidebar_classes.rhtml' %>
4+
<nav id="navigation" role="navigation">
5+
<%= render '_sidebar_pages.rhtml' %>
6+
<%= render '_sidebar_classes.rhtml' %>
77

8-
<%= render '_footer.rhtml' %>
9-
</nav>
8+
<%= render '_footer.rhtml' %>
9+
</nav>
1010

11-
<main role="main">
12-
<h1>Not Found</h1>
11+
<main role="main">
12+
<h1>Not Found</h1>
1313

14-
<p><%= message %>
15-
</main>
14+
<p><%= message %></p>
15+
</main>
16+
</body>

0 commit comments

Comments
 (0)