rdoc 7.0.4 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +70 -4
- data/doc/markup_reference/markdown.md +558 -0
- data/doc/markup_reference/rdoc.rdoc +1169 -0
- data/lib/rdoc/code_object/class_module.rb +24 -3
- data/lib/rdoc/code_object/context/section.rb +20 -1
- data/lib/rdoc/cross_reference.rb +30 -21
- data/lib/rdoc/generator/darkfish.rb +1 -1
- data/lib/rdoc/generator/json_index.rb +1 -1
- data/lib/rdoc/generator/template/aliki/_head.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +6 -8
- data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +6 -8
- data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/class.rhtml +20 -18
- data/lib/rdoc/generator/template/aliki/css/rdoc.css +20 -0
- data/lib/rdoc/generator/template/aliki/js/c_highlighter.js +1 -1
- data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +6 -8
- data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +6 -8
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/class.rhtml +19 -17
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +19 -0
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
- data/lib/rdoc/markdown.kpeg +1 -5
- data/lib/rdoc/markdown.rb +1 -5
- data/lib/rdoc/markup/attribute_manager.rb +28 -1
- data/lib/rdoc/markup/document.rb +2 -2
- data/lib/rdoc/markup/formatter.rb +1 -1
- data/lib/rdoc/markup/heading.rb +99 -27
- data/lib/rdoc/markup/indented_paragraph.rb +1 -1
- data/lib/rdoc/markup/list.rb +2 -2
- data/lib/rdoc/markup/list_item.rb +2 -2
- data/lib/rdoc/markup/to_html.rb +31 -11
- data/lib/rdoc/markup/to_html_crossref.rb +24 -5
- data/lib/rdoc/markup/to_label.rb +11 -1
- data/lib/rdoc/markup/verbatim.rb +2 -2
- data/lib/rdoc/markup.rb +2 -2
- data/lib/rdoc/parser/c.rb +1 -1
- data/lib/rdoc/parser/changelog.rb +8 -0
- data/lib/rdoc/ri/paths.rb +1 -1
- data/lib/rdoc/servlet.rb +1 -1
- data/lib/rdoc/text.rb +15 -0
- data/lib/rdoc/token_stream.rb +4 -8
- data/lib/rdoc/version.rb +1 -1
- data/rdoc.gemspec +2 -2
- metadata +5 -7
- data/ExampleMarkdown.md +0 -39
- data/ExampleRDoc.rdoc +0 -210
|
@@ -188,10 +188,26 @@ class RDoc::ClassModule < RDoc::Context
|
|
|
188
188
|
end
|
|
189
189
|
|
|
190
190
|
##
|
|
191
|
-
# HTML fragment reference for this module or class
|
|
192
|
-
#
|
|
191
|
+
# HTML fragment reference for this module or class using GitHub-style
|
|
192
|
+
# anchor format (lowercase, :: replaced with -).
|
|
193
|
+
#
|
|
194
|
+
# Examples:
|
|
195
|
+
# Foo -> class-foo
|
|
196
|
+
# Foo::Bar -> class-foo-bar
|
|
193
197
|
|
|
194
198
|
def aref
|
|
199
|
+
"#{aref_prefix}-#{full_name.downcase.gsub('::', '-')}"
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
##
|
|
203
|
+
# Legacy HTML fragment reference for backward compatibility.
|
|
204
|
+
# Returns the old RDoc-style anchor format.
|
|
205
|
+
#
|
|
206
|
+
# Examples:
|
|
207
|
+
# Foo -> class-Foo
|
|
208
|
+
# Foo::Bar -> class-Foo::Bar
|
|
209
|
+
|
|
210
|
+
def legacy_aref
|
|
195
211
|
"#{aref_prefix}-#{full_name}"
|
|
196
212
|
end
|
|
197
213
|
|
|
@@ -477,7 +493,12 @@ class RDoc::ClassModule < RDoc::Context
|
|
|
477
493
|
document = document.merge other_document
|
|
478
494
|
|
|
479
495
|
@comment = RDoc::Comment.from_document(document)
|
|
480
|
-
|
|
496
|
+
|
|
497
|
+
@comment_location = if document.parts.first.is_a?(RDoc::Markup::Document)
|
|
498
|
+
document.parts.map { |doc| [doc, doc.file] }
|
|
499
|
+
else
|
|
500
|
+
[[document, document.file]]
|
|
501
|
+
end
|
|
481
502
|
end
|
|
482
503
|
|
|
483
504
|
cm = class_module
|
|
@@ -70,11 +70,30 @@ class RDoc::Context::Section
|
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
##
|
|
73
|
-
# Anchor reference for linking to this section
|
|
73
|
+
# Anchor reference for linking to this section using GitHub-style format.
|
|
74
|
+
#
|
|
75
|
+
# Examples:
|
|
76
|
+
# "Section" -> "section"
|
|
77
|
+
# "One Two" -> "one-two"
|
|
78
|
+
# "[untitled]" -> "untitled"
|
|
74
79
|
|
|
75
80
|
def aref
|
|
76
81
|
title = @title || '[untitled]'
|
|
77
82
|
|
|
83
|
+
RDoc::Text.to_anchor(title)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
##
|
|
87
|
+
# Legacy anchor reference for backward compatibility.
|
|
88
|
+
#
|
|
89
|
+
# Examples:
|
|
90
|
+
# "Section" -> "section"
|
|
91
|
+
# "One Two" -> "one+two"
|
|
92
|
+
# "[untitled]" -> "5Buntitled-5D"
|
|
93
|
+
|
|
94
|
+
def legacy_aref
|
|
95
|
+
title = @title || '[untitled]'
|
|
96
|
+
|
|
78
97
|
CGI.escape(title).gsub('%', '-').sub(/^-/, '')
|
|
79
98
|
end
|
|
80
99
|
|
data/lib/rdoc/cross_reference.rb
CHANGED
|
@@ -132,47 +132,56 @@ class RDoc::CrossReference
|
|
|
132
132
|
end
|
|
133
133
|
|
|
134
134
|
##
|
|
135
|
-
# Returns a method reference to +name
|
|
135
|
+
# Returns a method, attribute or constant reference to +name+
|
|
136
|
+
# if it exists in the containing context object. It returns
|
|
137
|
+
# nil otherwise.
|
|
138
|
+
#
|
|
139
|
+
# For example, this method would decompose name = 'A::CONSTANT' into a
|
|
140
|
+
# container object A and a symbol 'CONSTANT', and it would try to find
|
|
141
|
+
# 'CONSTANT' in A.
|
|
136
142
|
|
|
137
|
-
def
|
|
143
|
+
def resolve_local_symbol(name)
|
|
138
144
|
ref = nil
|
|
145
|
+
type = nil
|
|
146
|
+
container = nil
|
|
139
147
|
|
|
140
|
-
|
|
148
|
+
case name
|
|
149
|
+
when /#{CLASS_REGEXP_STR}::([A-Z]\w*)\z/o then
|
|
150
|
+
symbol = $2
|
|
151
|
+
container = @context.find_symbol_module($1)
|
|
152
|
+
when /#{CLASS_REGEXP_STR}([.#]|::)#{METHOD_REGEXP_STR}/o then
|
|
141
153
|
type = $2
|
|
142
154
|
if '.' == type # will find either #method or ::method
|
|
143
|
-
|
|
155
|
+
symbol = $3
|
|
144
156
|
else
|
|
145
|
-
|
|
157
|
+
symbol = "#{type}#{$3}"
|
|
146
158
|
end
|
|
147
159
|
container = @context.find_symbol_module($1)
|
|
148
|
-
|
|
160
|
+
when /^([.#]|::)#{METHOD_REGEXP_STR}/o then
|
|
149
161
|
type = $1
|
|
150
162
|
if '.' == type
|
|
151
|
-
|
|
163
|
+
symbol = $2
|
|
152
164
|
else
|
|
153
|
-
|
|
165
|
+
symbol = "#{type}#{$2}"
|
|
154
166
|
end
|
|
155
167
|
container = @context
|
|
156
|
-
else
|
|
157
|
-
type = nil
|
|
158
|
-
container = nil
|
|
159
168
|
end
|
|
160
169
|
|
|
161
170
|
if container then
|
|
162
171
|
unless RDoc::TopLevel === container then
|
|
163
172
|
if '.' == type then
|
|
164
|
-
if 'new' ==
|
|
165
|
-
ref = container.find_local_symbol
|
|
166
|
-
ref = container.find_ancestor_local_symbol
|
|
173
|
+
if 'new' == symbol then # AnyClassName.new will be class method
|
|
174
|
+
ref = container.find_local_symbol symbol
|
|
175
|
+
ref = container.find_ancestor_local_symbol symbol unless ref
|
|
167
176
|
else
|
|
168
|
-
ref = container.find_local_symbol "::#{
|
|
169
|
-
ref = container.find_ancestor_local_symbol "::#{
|
|
170
|
-
ref = container.find_local_symbol "##{
|
|
171
|
-
ref = container.find_ancestor_local_symbol "##{
|
|
177
|
+
ref = container.find_local_symbol "::#{symbol}"
|
|
178
|
+
ref = container.find_ancestor_local_symbol "::#{symbol}" unless ref
|
|
179
|
+
ref = container.find_local_symbol "##{symbol}" unless ref
|
|
180
|
+
ref = container.find_ancestor_local_symbol "##{symbol}" unless ref
|
|
172
181
|
end
|
|
173
182
|
else
|
|
174
|
-
ref = container.find_local_symbol
|
|
175
|
-
ref = container.find_ancestor_local_symbol
|
|
183
|
+
ref = container.find_local_symbol symbol
|
|
184
|
+
ref = container.find_ancestor_local_symbol symbol unless ref
|
|
176
185
|
end
|
|
177
186
|
end
|
|
178
187
|
end
|
|
@@ -197,7 +206,7 @@ class RDoc::CrossReference
|
|
|
197
206
|
@context.find_symbol name
|
|
198
207
|
end
|
|
199
208
|
|
|
200
|
-
ref =
|
|
209
|
+
ref = resolve_local_symbol name unless ref
|
|
201
210
|
|
|
202
211
|
# Try a page name
|
|
203
212
|
ref = @store.page name if not ref and name =~ /^[\w.\/]+$/
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<%- elsif @title %>
|
|
29
29
|
<meta name="keywords" content="ruby,documentation,<%= h @title %>">
|
|
30
30
|
<%- if @options.main_page and
|
|
31
|
-
main_page = @files.find { |f| f.full_name == @options.main_page } %>
|
|
31
|
+
main_page = @files.find { |f| f.full_name == @options.main_page } then %>
|
|
32
32
|
<meta
|
|
33
33
|
name="description"
|
|
34
34
|
content="<%= h "#{@title}: #{excerpt(main_page.comment)}" %>"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%- unless klass.extends.empty? %>
|
|
1
|
+
<%- unless klass.extends.empty? then %>
|
|
2
2
|
<div id="extends-section" class="nav-section">
|
|
3
3
|
<details class="nav-section-collapsible" open>
|
|
4
4
|
<summary class="nav-section-header">
|
|
@@ -13,13 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
<ul class="nav-list">
|
|
15
15
|
<%- klass.extends.each do |ext| %>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<%- end %>
|
|
22
|
-
</li>
|
|
16
|
+
<%- unless String === ext.module then %>
|
|
17
|
+
<li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a></li>
|
|
18
|
+
<%- else %>
|
|
19
|
+
<li><span class="extend"><%= ext.name %></span></li>
|
|
20
|
+
<%- end %>
|
|
23
21
|
<%- end %>
|
|
24
22
|
</ul>
|
|
25
23
|
</details>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%- unless klass.includes.empty? %>
|
|
1
|
+
<%- unless klass.includes.empty? then %>
|
|
2
2
|
<div id="includes-section" class="nav-section">
|
|
3
3
|
<details class="nav-section-collapsible" open>
|
|
4
4
|
<summary class="nav-section-header">
|
|
@@ -13,13 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
<ul class="nav-list">
|
|
15
15
|
<%- klass.includes.each do |inc| %>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<%- end %>
|
|
22
|
-
</li>
|
|
16
|
+
<%- unless String === inc.module then %>
|
|
17
|
+
<li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
|
|
18
|
+
<%- else %>
|
|
19
|
+
<li><span class="include"><%= inc.name %></span></li>
|
|
20
|
+
<%- end %>
|
|
23
21
|
<%- end %>
|
|
24
22
|
</ul>
|
|
25
23
|
</details>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name %>
|
|
5
5
|
<%- end %>
|
|
6
6
|
|
|
7
|
-
<%- unless simple_files.empty? %>
|
|
7
|
+
<%- unless simple_files.empty? then %>
|
|
8
8
|
<div id="fileindex-section" class="nav-section">
|
|
9
9
|
<details class="nav-section-collapsible" <%= 'open' unless @inside_class_file %>>
|
|
10
10
|
<summary class="nav-section-header">
|
|
@@ -22,13 +22,14 @@
|
|
|
22
22
|
<% if namespace[:self] %>
|
|
23
23
|
<span><%= namespace[:name] %></span>
|
|
24
24
|
<% else %>
|
|
25
|
-
<a href="<%= namespace[:path] %>"><%= namespace[:name] %></a><span
|
|
25
|
+
<a href="<%= namespace[:path] %>"><%= namespace[:name] %></a><span>::</span>
|
|
26
26
|
<% end %>
|
|
27
27
|
</li>
|
|
28
28
|
<% end %>
|
|
29
29
|
</ol>
|
|
30
30
|
<% end %>
|
|
31
31
|
|
|
32
|
+
<span id="<%= h klass.legacy_aref %>" class="legacy-anchor"></span>
|
|
32
33
|
<h1 id="<%= h klass.aref %>" class="anchor-link <%= klass.type %>">
|
|
33
34
|
<%= klass.type %> <%= klass.full_name %>
|
|
34
35
|
</h1>
|
|
@@ -38,8 +39,9 @@
|
|
|
38
39
|
</section>
|
|
39
40
|
|
|
40
41
|
<%- klass.each_section do |section, constants, attributes| %>
|
|
42
|
+
<span id="<%= section.legacy_aref %>" class="legacy-anchor"></span>
|
|
41
43
|
<section id="<%= section.aref %>" class="documentation-section anchor-link">
|
|
42
|
-
<%- if section.title %>
|
|
44
|
+
<%- if section.title then %>
|
|
43
45
|
<header class="documentation-section-title">
|
|
44
46
|
<h2>
|
|
45
47
|
<a href="#<%= section.aref %>"><%= section.title %></a>
|
|
@@ -47,13 +49,13 @@
|
|
|
47
49
|
</header>
|
|
48
50
|
<%- end %>
|
|
49
51
|
|
|
50
|
-
<%- if section.comment %>
|
|
52
|
+
<%- if section.comment then %>
|
|
51
53
|
<div>
|
|
52
54
|
<%= section.description %>
|
|
53
55
|
</div>
|
|
54
56
|
<%- end %>
|
|
55
57
|
|
|
56
|
-
<%- unless constants.empty? %>
|
|
58
|
+
<%- unless constants.empty? then %>
|
|
57
59
|
<section class="constants-list">
|
|
58
60
|
<header>
|
|
59
61
|
<h3 id="constants"><a href="#constants">Constants</a></h3>
|
|
@@ -61,9 +63,9 @@
|
|
|
61
63
|
<dl>
|
|
62
64
|
<%- constants.each do |const| %>
|
|
63
65
|
<dt id="<%= const.name %>"><%= const.name %></dt>
|
|
64
|
-
<%- if const.comment %>
|
|
66
|
+
<%- if const.comment then %>
|
|
65
67
|
<dd>
|
|
66
|
-
<%- if const.mixin_from %>
|
|
68
|
+
<%- if const.mixin_from then %>
|
|
67
69
|
<div class="mixin-from">
|
|
68
70
|
Included from <a href="<%= klass.aref_to(const.mixin_from.path) %>"><%= const.mixin_from.full_name %></a>
|
|
69
71
|
</div>
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
</section>
|
|
79
81
|
<%- end %>
|
|
80
82
|
|
|
81
|
-
<%- unless attributes.empty? %>
|
|
83
|
+
<%- unless attributes.empty? then %>
|
|
82
84
|
<section class="attribute-method-details method-section">
|
|
83
85
|
<header>
|
|
84
86
|
<h3 id="attributes"><a href="#attributes">Attributes</a></h3>
|
|
@@ -94,12 +96,12 @@
|
|
|
94
96
|
</div>
|
|
95
97
|
|
|
96
98
|
<div class="method-description">
|
|
97
|
-
<%- if attrib.mixin_from %>
|
|
99
|
+
<%- if attrib.mixin_from then %>
|
|
98
100
|
<div class="mixin-from">
|
|
99
101
|
<%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path) %>"><%= attrib.mixin_from.full_name %></a>
|
|
100
102
|
</div>
|
|
101
103
|
<%- end %>
|
|
102
|
-
<%- if attrib.comment %>
|
|
104
|
+
<%- if attrib.comment then %>
|
|
103
105
|
<%= attrib.description.strip %>
|
|
104
106
|
<%- else %>
|
|
105
107
|
<p class="missing-docs">(Not documented)</p>
|
|
@@ -122,7 +124,7 @@
|
|
|
122
124
|
<%- methods.each do |method| %>
|
|
123
125
|
<div id="<%= method.aref %>" class="method-detail anchor-link <%= method.is_alias_for ? "method-alias" : '' %>">
|
|
124
126
|
<div class="method-header">
|
|
125
|
-
<%- if (call_seq = method.call_seq) %>
|
|
127
|
+
<%- if (call_seq = method.call_seq) then %>
|
|
126
128
|
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
|
|
127
129
|
<div class="method-heading">
|
|
128
130
|
<a href="#<%= method.aref %>" title="Link to this method">
|
|
@@ -134,7 +136,7 @@
|
|
|
134
136
|
</a>
|
|
135
137
|
</div>
|
|
136
138
|
<%- end %>
|
|
137
|
-
<%- elsif method.has_call_seq? %>
|
|
139
|
+
<%- elsif method.has_call_seq? then %>
|
|
138
140
|
<div class="method-heading">
|
|
139
141
|
<a href="#<%= method.aref %>" title="Link to this method">
|
|
140
142
|
<span class="method-name"><%= h method.name %></span>
|
|
@@ -157,23 +159,23 @@
|
|
|
157
159
|
</details>
|
|
158
160
|
</div>
|
|
159
161
|
<div class="method-source-code" id="<%= method.html_name %>-source">
|
|
160
|
-
<pre class="<%= method.source_language %>"
|
|
162
|
+
<pre class="<%= method.source_language %>"><%= method.markup_code %></pre>
|
|
161
163
|
</div>
|
|
162
164
|
<%- end %>
|
|
163
165
|
|
|
164
|
-
<%- unless method.skip_description? %>
|
|
166
|
+
<%- unless method.skip_description? then %>
|
|
165
167
|
<div class="method-description">
|
|
166
|
-
<%- if method.mixin_from %>
|
|
168
|
+
<%- if method.mixin_from then %>
|
|
167
169
|
<div class="mixin-from">
|
|
168
170
|
<%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
|
|
169
171
|
</div>
|
|
170
172
|
<%- end %>
|
|
171
|
-
<%- if method.comment %>
|
|
173
|
+
<%- if method.comment then %>
|
|
172
174
|
<%= method.description.strip %>
|
|
173
175
|
<%- else %>
|
|
174
176
|
<p class="missing-docs">(Not documented)</p>
|
|
175
177
|
<%- end %>
|
|
176
|
-
<%- if method.calls_super %>
|
|
178
|
+
<%- if method.calls_super then %>
|
|
177
179
|
<div class="method-calls-super">
|
|
178
180
|
Calls superclass method
|
|
179
181
|
<%=
|
|
@@ -185,7 +187,7 @@
|
|
|
185
187
|
</div>
|
|
186
188
|
<%- end %>
|
|
187
189
|
|
|
188
|
-
<%- unless method.aliases.empty? %>
|
|
190
|
+
<%- unless method.aliases.empty? then %>
|
|
189
191
|
<div class="aliases">
|
|
190
192
|
Also aliased as: <%= method.aliases.map do |aka|
|
|
191
193
|
if aka.parent then # HACK lib/rexml/encodings
|
|
@@ -197,7 +199,7 @@
|
|
|
197
199
|
</div>
|
|
198
200
|
<%- end %>
|
|
199
201
|
|
|
200
|
-
<%- if method.is_alias_for %>
|
|
202
|
+
<%- if method.is_alias_for then %>
|
|
201
203
|
<div class="aliases">
|
|
202
204
|
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
|
203
205
|
</div>
|
|
@@ -1190,6 +1190,26 @@ main .anchor-link:target {
|
|
|
1190
1190
|
scroll-margin-top: calc(var(--layout-header-height) + 2rem);
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
|
+
/* Legacy anchor for backward compatibility with old label- prefix links */
|
|
1194
|
+
.legacy-anchor {
|
|
1195
|
+
display: block;
|
|
1196
|
+
position: relative;
|
|
1197
|
+
visibility: hidden;
|
|
1198
|
+
scroll-margin-top: calc(var(--layout-header-height) + 2rem);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
/* When a legacy anchor is targeted, highlight the next heading sibling */
|
|
1202
|
+
.legacy-anchor:target + h1,
|
|
1203
|
+
.legacy-anchor:target + h2,
|
|
1204
|
+
.legacy-anchor:target + h3,
|
|
1205
|
+
.legacy-anchor:target + h4,
|
|
1206
|
+
.legacy-anchor:target + h5,
|
|
1207
|
+
.legacy-anchor:target + h6 {
|
|
1208
|
+
margin-left: calc(-1 * var(--space-5));
|
|
1209
|
+
padding-left: calc(var(--space-5) / 2);
|
|
1210
|
+
border-left: calc(var(--space-5) / 2) solid var(--color-border-default);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1193
1213
|
|
|
1194
1214
|
/* Utility Classes */
|
|
1195
1215
|
.hide { display: none !important; }
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
* Initialize C syntax highlighting on page load
|
|
277
277
|
*/
|
|
278
278
|
function initHighlighting() {
|
|
279
|
-
const codeBlocks = document.querySelectorAll('pre
|
|
279
|
+
const codeBlocks = document.querySelectorAll('pre.c');
|
|
280
280
|
|
|
281
281
|
codeBlocks.forEach(block => {
|
|
282
282
|
if (block.getAttribute('data-highlighted') === 'true') {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
<%- gems = installed.select { |_, _, _, type,| type == :gem } %>
|
|
44
44
|
<%- missing = gems.reject { |_, _, exists,| exists } %>
|
|
45
|
-
<%- unless missing.empty? %>
|
|
45
|
+
<%- unless missing.empty? then %>
|
|
46
46
|
<h2>Missing Gem Documentation</h2>
|
|
47
47
|
|
|
48
48
|
<p>You are missing documentation for some of your installed gems.
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
<%- unless klass.extends.empty? %>
|
|
1
|
+
<%- unless klass.extends.empty? then %>
|
|
2
2
|
<div id="extends-section" class="nav-section">
|
|
3
3
|
<h3>Extended With Modules</h3>
|
|
4
4
|
|
|
5
5
|
<ul class="link-list">
|
|
6
6
|
<%- klass.extends.each do |ext| %>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<%- end %>
|
|
13
|
-
</li>
|
|
7
|
+
<%- unless String === ext.module then %>
|
|
8
|
+
<li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a></li>
|
|
9
|
+
<%- else %>
|
|
10
|
+
<li><span class="extend"><%= ext.name %></span></li>
|
|
11
|
+
<%- end %>
|
|
14
12
|
<%- end %>
|
|
15
13
|
</ul>
|
|
16
14
|
</div>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
<%- unless klass.includes.empty? %>
|
|
1
|
+
<%- unless klass.includes.empty? then %>
|
|
2
2
|
<div id="includes-section" class="nav-section">
|
|
3
3
|
<h3>Included Modules</h3>
|
|
4
4
|
|
|
5
5
|
<ul class="link-list">
|
|
6
6
|
<%- klass.includes.each do |inc| %>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<%- end %>
|
|
13
|
-
</li>
|
|
7
|
+
<%- unless String === inc.module then %>
|
|
8
|
+
<li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
|
|
9
|
+
<%- else %>
|
|
10
|
+
<li><span class="include"><%= inc.name %></span></li>
|
|
11
|
+
<%- end %>
|
|
14
12
|
<%- end %>
|
|
15
13
|
</ul>
|
|
16
14
|
</div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<%- comment = if current.respond_to? :comment_location
|
|
1
|
+
<%- comment = if current.respond_to? :comment_location then
|
|
2
2
|
current.comment_location
|
|
3
3
|
else
|
|
4
4
|
current.comment
|
|
5
5
|
end
|
|
6
6
|
table = current.parse(comment).table_of_contents.dup
|
|
7
7
|
|
|
8
|
-
if table.length > 1 %>
|
|
8
|
+
if table.length > 1 then %>
|
|
9
9
|
<div class="nav-section">
|
|
10
10
|
<h3>Table of Contents</h3>
|
|
11
11
|
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
<%- level = table.first&.level %>
|
|
18
18
|
<%- while table.first && table.first.level >= level %>
|
|
19
19
|
<%- heading = table.shift %>
|
|
20
|
-
<li>
|
|
21
20
|
<%- if table.first.nil? || table.first.level <= heading.level %>
|
|
22
|
-
|
|
21
|
+
<li><% display_link.call heading %></li>
|
|
23
22
|
<%- else %>
|
|
23
|
+
<li>
|
|
24
24
|
<details open>
|
|
25
25
|
<summary><%- display_link.call heading %></summary>
|
|
26
26
|
<ul class="link-list" role="directory">
|
|
27
27
|
<% list_siblings.call %>
|
|
28
28
|
</ul>
|
|
29
29
|
</details>
|
|
30
|
+
</li>
|
|
30
31
|
<%- end %>
|
|
31
|
-
</li>
|
|
32
32
|
<%- end %>
|
|
33
33
|
<%- end %>
|
|
34
34
|
|