jazzy 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/Tests.yml +1 -1
- data/.rubocop.yml +17 -1
- data/CHANGELOG.md +29 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile.lock +36 -34
- data/README.md +3 -0
- data/bin/sourcekitten +0 -0
- data/lib/jazzy/config.rb +6 -0
- data/lib/jazzy/doc_builder.rb +9 -2
- data/lib/jazzy/gem_version.rb +1 -1
- data/lib/jazzy/highlighter.rb +12 -0
- data/lib/jazzy/jazzy_markdown.rb +13 -3
- data/lib/jazzy/source_declaration/type.rb +26 -2
- data/lib/jazzy/source_declaration.rb +9 -0
- data/lib/jazzy/sourcekitten.rb +55 -9
- data/lib/jazzy/stats.rb +11 -2
- data/lib/jazzy/symbol_graph/graph.rb +6 -1
- data/lib/jazzy/symbol_graph/relationship.rb +6 -0
- data/lib/jazzy/symbol_graph/sym_node.rb +14 -1
- data/lib/jazzy/symbol_graph/symbol.rb +36 -10
- data/lib/jazzy/themes/apple/templates/doc.mustache +1 -2
- data/lib/jazzy/themes/apple/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/apple/templates/header.mustache +4 -4
- data/lib/jazzy/themes/apple/templates/task.mustache +3 -8
- data/lib/jazzy/themes/fullwidth/templates/doc.mustache +1 -2
- data/lib/jazzy/themes/fullwidth/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/fullwidth/templates/header.mustache +4 -4
- data/lib/jazzy/themes/fullwidth/templates/task.mustache +3 -8
- data/lib/jazzy/themes/jony/templates/doc.mustache +1 -2
- data/lib/jazzy/themes/jony/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/jony/templates/header.mustache +2 -2
- data/lib/jazzy/themes/jony/templates/task.mustache +3 -8
- data/spec/integration_spec.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f55576dbfb09517321b17ea90b50e672c8ad6c50c563e087b381849ed2f7445
|
4
|
+
data.tar.gz: 9a5c54d86a73cf125109bd87a0f669c9807b419aa41f54174544d3ebd86632d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61f70f156605dacf0b066262b7ccf694902117ce483fc056fa669af232530a7da180ed70134e1c0b8570f8ad55228c3324b53007e6f9d0519fe306977bd40b1e
|
7
|
+
data.tar.gz: 7655c01fd0c0bc9113b532b2e0531e56faf0aa00a5815a9713ca35b4cfa1fb45c391f6b77b4cd8501bce34ed4617c84dc1e2e436afda7bf8721d715ddb917d70
|
data/.github/workflows/Tests.yml
CHANGED
@@ -31,7 +31,7 @@ jobs:
|
|
31
31
|
matrix:
|
32
32
|
spec: ["objc_spec", "swift_spec", "cocoapods_spec"]
|
33
33
|
env:
|
34
|
-
DEVELOPER_DIR: /Applications/
|
34
|
+
DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
|
35
35
|
steps:
|
36
36
|
- uses: actions/checkout@v2
|
37
37
|
with:
|
data/.rubocop.yml
CHANGED
@@ -7,7 +7,7 @@ AllCops:
|
|
7
7
|
SuggestExtensions: false
|
8
8
|
TargetRubyVersion: 2.6
|
9
9
|
|
10
|
-
#- Pending Cops as of 1.
|
10
|
+
#- Pending Cops as of 1.22.0 ---------------------------------------------#
|
11
11
|
|
12
12
|
Gemspec/DateAssignment: # (new in 1.10)
|
13
13
|
Enabled: true
|
@@ -29,6 +29,8 @@ Lint/EmptyClass: # (new in 1.3)
|
|
29
29
|
Enabled: true
|
30
30
|
Lint/EmptyInPattern: # (new in 1.16)
|
31
31
|
Enabled: true
|
32
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
33
|
+
Enabled: true
|
32
34
|
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
|
33
35
|
Enabled: true
|
34
36
|
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
|
@@ -39,6 +41,8 @@ Lint/OrAssignmentToConstant: # (new in 1.9)
|
|
39
41
|
Enabled: true
|
40
42
|
Lint/RedundantDirGlobSort: # (new in 1.8)
|
41
43
|
Enabled: true
|
44
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
45
|
+
Enabled: true
|
42
46
|
Lint/SymbolConversion: # (new in 1.9)
|
43
47
|
Enabled: true
|
44
48
|
Lint/ToEnumArguments: # (new in 1.1)
|
@@ -51,6 +55,8 @@ Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
|
|
51
55
|
Enabled: true
|
52
56
|
Naming/InclusiveLanguage: # (new in 1.18)
|
53
57
|
Enabled: true
|
58
|
+
Security/IoMethods: # new in 1.22
|
59
|
+
Enabled: true
|
54
60
|
Style/ArgumentsForwarding: # (new in 1.1)
|
55
61
|
Enabled: true
|
56
62
|
Style/CollectionCompact: # (new in 1.2)
|
@@ -73,12 +79,18 @@ Style/NegatedIfElseCondition: # (new in 1.2)
|
|
73
79
|
Enabled: true
|
74
80
|
Style/NilLambda: # (new in 1.3)
|
75
81
|
Enabled: true
|
82
|
+
Style/NumberedParameters: # new in 1.22
|
83
|
+
Enabled: true
|
84
|
+
Style/NumberedParametersLimit: # new in 1.22
|
85
|
+
Enabled: true
|
76
86
|
Style/QuotedSymbols: # (new in 1.16)
|
77
87
|
Enabled: true
|
78
88
|
Style/RedundantArgument: # (new in 1.4)
|
79
89
|
Enabled: true
|
80
90
|
Style/RedundantSelfAssignmentBranch: # (new in 1.19)
|
81
91
|
Enabled: true
|
92
|
+
Style/SelectByRegexp: # new in 1.22
|
93
|
+
Enabled: true
|
82
94
|
Style/StringChars: # (new in 1.12)
|
83
95
|
Enabled: true
|
84
96
|
Style/SwapValues: # (new in 1.1)
|
@@ -195,6 +207,10 @@ Metrics/CyclomaticComplexity:
|
|
195
207
|
Metrics/PerceivedComplexity:
|
196
208
|
Max: 10
|
197
209
|
|
210
|
+
# Too much firing on basic arithmetic
|
211
|
+
Lint/AmbiguousOperatorPrecedence:
|
212
|
+
Enabled: false
|
213
|
+
|
198
214
|
#- Jazzy specs -----------------------------------------------------------#
|
199
215
|
|
200
216
|
# Allow for `should.match /regexp/`.
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
## 0.14.1
|
2
|
+
|
3
|
+
##### Breaking
|
4
|
+
|
5
|
+
* Support Swift SPI groups. Swift declarations marked `@_spi` are no longer
|
6
|
+
included in docs when `--min-acl` is set to `public` or `open`. Use
|
7
|
+
`--include-spi-declarations` to include docs for these declarations.
|
8
|
+
[John Fairhurst](https://github.com/johnfairh)
|
9
|
+
[#1263](https://github.com/realm/jazzy/issues/1263)
|
10
|
+
|
11
|
+
##### Enhancements
|
12
|
+
|
13
|
+
* Correct line number references with Xcode 13.
|
14
|
+
[John Fairhurst](https://github.com/johnfairh)
|
15
|
+
|
16
|
+
* Support `union` declarations in Objective-C headers.
|
17
|
+
[Brian Osborn](https://github.com/bosborn)
|
18
|
+
[John Fairhurst](https://github.com/johnfairh)
|
19
|
+
|
20
|
+
* Support Swift concurrency features: identify actors and asynchronous
|
21
|
+
methods.
|
22
|
+
[John Fairhurst](https://github.com/johnfairh)
|
23
|
+
|
24
|
+
##### Bug Fixes
|
25
|
+
|
26
|
+
* Improve HTML5 correctness, all themes.
|
27
|
+
[John Fairhurst](https://github.com/johnfairh)
|
28
|
+
[#1280](https://github.com/realm/jazzy/issues/1280)
|
29
|
+
|
1
30
|
## 0.14.0
|
2
31
|
|
3
32
|
##### Breaking
|
data/CONTRIBUTING.md
CHANGED
@@ -49,7 +49,7 @@ git push
|
|
49
49
|
You'll need push access to the integration specs repo to do this. You can
|
50
50
|
request access from one of the maintainers when filing your PR.
|
51
51
|
|
52
|
-
You must have Xcode
|
52
|
+
You must have Xcode 13 installed to build the integration specs.
|
53
53
|
|
54
54
|
## Making changes to SourceKitten
|
55
55
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jazzy (0.14.
|
4
|
+
jazzy (0.14.1)
|
5
5
|
cocoapods (~> 1.5)
|
6
6
|
mustache (~> 1.1)
|
7
7
|
open4 (~> 1.3)
|
@@ -15,12 +15,14 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
CFPropertyList (3.0.
|
19
|
-
|
18
|
+
CFPropertyList (3.0.4)
|
19
|
+
rexml
|
20
|
+
activesupport (6.1.4.1)
|
20
21
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
|
-
i18n (>=
|
22
|
-
minitest (
|
23
|
-
tzinfo (~>
|
22
|
+
i18n (>= 1.6, < 2)
|
23
|
+
minitest (>= 5.1)
|
24
|
+
tzinfo (~> 2.0)
|
25
|
+
zeitwerk (~> 2.3)
|
24
26
|
addressable (2.8.0)
|
25
27
|
public_suffix (>= 2.0.2, < 5.0)
|
26
28
|
algoliasearch (1.27.5)
|
@@ -37,10 +39,10 @@ GEM
|
|
37
39
|
clintegracon (0.7.0)
|
38
40
|
colored (~> 1.2)
|
39
41
|
diffy
|
40
|
-
cocoapods (1.
|
41
|
-
addressable (~> 2.
|
42
|
+
cocoapods (1.11.2)
|
43
|
+
addressable (~> 2.8)
|
42
44
|
claide (>= 1.0.2, < 2.0)
|
43
|
-
cocoapods-core (= 1.
|
45
|
+
cocoapods-core (= 1.11.2)
|
44
46
|
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
45
47
|
cocoapods-downloader (>= 1.4.0, < 2.0)
|
46
48
|
cocoapods-plugins (>= 1.0.0, < 2.0)
|
@@ -51,26 +53,26 @@ GEM
|
|
51
53
|
escape (~> 0.0.4)
|
52
54
|
fourflusher (>= 2.3.0, < 3.0)
|
53
55
|
gh_inspector (~> 1.0)
|
54
|
-
molinillo (~> 0.
|
56
|
+
molinillo (~> 0.8.0)
|
55
57
|
nap (~> 1.0)
|
56
|
-
ruby-macho (
|
57
|
-
xcodeproj (>= 1.
|
58
|
-
cocoapods-core (1.
|
59
|
-
activesupport (
|
60
|
-
addressable (~> 2.
|
58
|
+
ruby-macho (>= 1.0, < 3.0)
|
59
|
+
xcodeproj (>= 1.21.0, < 2.0)
|
60
|
+
cocoapods-core (1.11.2)
|
61
|
+
activesupport (>= 5.0, < 7)
|
62
|
+
addressable (~> 2.8)
|
61
63
|
algoliasearch (~> 1.0)
|
62
64
|
concurrent-ruby (~> 1.1)
|
63
65
|
fuzzy_match (~> 2.0.4)
|
64
66
|
nap (~> 1.0)
|
65
67
|
netrc (~> 0.11)
|
66
|
-
public_suffix
|
68
|
+
public_suffix (~> 4.0)
|
67
69
|
typhoeus (~> 1.0)
|
68
|
-
cocoapods-deintegrate (1.0.
|
69
|
-
cocoapods-downloader (1.
|
70
|
+
cocoapods-deintegrate (1.0.5)
|
71
|
+
cocoapods-downloader (1.5.1)
|
70
72
|
cocoapods-plugins (1.0.0)
|
71
73
|
nap
|
72
74
|
cocoapods-search (1.0.1)
|
73
|
-
cocoapods-trunk (1.
|
75
|
+
cocoapods-trunk (1.6.0)
|
74
76
|
nap (>= 0.8, < 2.0)
|
75
77
|
netrc (~> 0.11)
|
76
78
|
cocoapods-try (1.2.0)
|
@@ -81,7 +83,7 @@ GEM
|
|
81
83
|
colored2 (~> 3.1)
|
82
84
|
crack (0.4.5)
|
83
85
|
rexml
|
84
|
-
danger (8.
|
86
|
+
danger (8.4.0)
|
85
87
|
claide (~> 1.0)
|
86
88
|
claide-plugins (>= 0.9.2)
|
87
89
|
colored2 (~> 3.1)
|
@@ -98,7 +100,7 @@ GEM
|
|
98
100
|
escape (0.0.4)
|
99
101
|
ethon (0.14.0)
|
100
102
|
ffi (>= 1.15.0)
|
101
|
-
faraday (1.
|
103
|
+
faraday (1.8.0)
|
102
104
|
faraday-em_http (~> 1.0)
|
103
105
|
faraday-em_synchrony (~> 1.0)
|
104
106
|
faraday-excon (~> 1.1)
|
@@ -119,7 +121,7 @@ GEM
|
|
119
121
|
faraday-net_http_persistent (1.2.0)
|
120
122
|
faraday-patron (1.0.0)
|
121
123
|
faraday-rack (1.0.0)
|
122
|
-
ffi (1.15.
|
124
|
+
ffi (1.15.4)
|
123
125
|
fourflusher (2.3.1)
|
124
126
|
fuzzy_match (2.0.4)
|
125
127
|
gh_inspector (1.1.3)
|
@@ -139,7 +141,7 @@ GEM
|
|
139
141
|
mocha (1.13.0)
|
140
142
|
mocha-on-bacon (0.2.3)
|
141
143
|
mocha (>= 0.13.0)
|
142
|
-
molinillo (0.
|
144
|
+
molinillo (0.8.0)
|
143
145
|
multipart-post (2.1.1)
|
144
146
|
mustache (1.1.1)
|
145
147
|
nanaimo (0.3.0)
|
@@ -150,7 +152,7 @@ GEM
|
|
150
152
|
faraday (>= 0.9)
|
151
153
|
sawyer (~> 0.8.0, >= 0.5.3)
|
152
154
|
open4 (1.3.4)
|
153
|
-
parallel (1.
|
155
|
+
parallel (1.21.0)
|
154
156
|
parser (3.0.2.0)
|
155
157
|
ast (~> 2.4.1)
|
156
158
|
prettybacon (0.0.2)
|
@@ -162,19 +164,19 @@ GEM
|
|
162
164
|
redcarpet (3.5.1)
|
163
165
|
regexp_parser (2.1.1)
|
164
166
|
rexml (3.2.5)
|
165
|
-
rouge (3.26.
|
166
|
-
rubocop (1.
|
167
|
+
rouge (3.26.1)
|
168
|
+
rubocop (1.22.0)
|
167
169
|
parallel (~> 1.10)
|
168
170
|
parser (>= 3.0.0.0)
|
169
171
|
rainbow (>= 2.2.2, < 4.0)
|
170
172
|
regexp_parser (>= 1.8, < 3.0)
|
171
173
|
rexml
|
172
|
-
rubocop-ast (>= 1.
|
174
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
173
175
|
ruby-progressbar (~> 1.7)
|
174
176
|
unicode-display_width (>= 1.4.0, < 3.0)
|
175
|
-
rubocop-ast (1.
|
177
|
+
rubocop-ast (1.12.0)
|
176
178
|
parser (>= 3.0.1.1)
|
177
|
-
ruby-macho (
|
179
|
+
ruby-macho (2.5.1)
|
178
180
|
ruby-progressbar (1.11.0)
|
179
181
|
ruby2_keywords (0.0.5)
|
180
182
|
sassc (2.4.0)
|
@@ -183,14 +185,13 @@ GEM
|
|
183
185
|
addressable (>= 2.3.5)
|
184
186
|
faraday (> 0.8, < 2.0)
|
185
187
|
sqlite3 (1.4.2)
|
186
|
-
terminal-table (3.0.
|
188
|
+
terminal-table (3.0.2)
|
187
189
|
unicode-display_width (>= 1.1.1, < 3)
|
188
|
-
thread_safe (0.3.6)
|
189
190
|
typhoeus (1.4.0)
|
190
191
|
ethon (>= 0.9.0)
|
191
|
-
tzinfo (
|
192
|
-
|
193
|
-
unicode-display_width (2.
|
192
|
+
tzinfo (2.0.4)
|
193
|
+
concurrent-ruby (~> 1.0)
|
194
|
+
unicode-display_width (2.1.0)
|
194
195
|
webmock (3.14.0)
|
195
196
|
addressable (>= 2.8.0)
|
196
197
|
crack (>= 0.3.2)
|
@@ -204,6 +205,7 @@ GEM
|
|
204
205
|
colored2 (~> 3.1)
|
205
206
|
nanaimo (~> 0.3.0)
|
206
207
|
rexml (~> 3.2.4)
|
208
|
+
zeitwerk (2.4.2)
|
207
209
|
|
208
210
|
PLATFORMS
|
209
211
|
ruby
|
data/README.md
CHANGED
@@ -318,6 +318,9 @@ In Swift mode, Jazzy by default documents only `public` and `open` declarations.
|
|
318
318
|
include declarations with a lower access level, set the `--min-acl` flag to `internal`,
|
319
319
|
`fileprivate`, or `private`.
|
320
320
|
|
321
|
+
By default, Jazzy does not document declarations marked `@_spi` when `--min-acl` is
|
322
|
+
set to `public` or `open`. Set the `--include-spi-declarations` flag to include them.
|
323
|
+
|
321
324
|
In Objective-C mode, Jazzy documents all declarations found in the `--umbrella-header`
|
322
325
|
header file and any other header files included by it.
|
323
326
|
|
data/bin/sourcekitten
CHANGED
Binary file
|
data/lib/jazzy/config.rb
CHANGED
@@ -476,6 +476,12 @@ module Jazzy
|
|
476
476
|
'have children.',
|
477
477
|
default: false
|
478
478
|
|
479
|
+
config_attr :include_spi_declarations,
|
480
|
+
command_line: '--[no-]include-spi-declarations',
|
481
|
+
description: 'Include Swift declarations marked `@_spi` even if '\
|
482
|
+
'--min-acl is set to `public` or `open`.',
|
483
|
+
default: false
|
484
|
+
|
479
485
|
# rubocop:enable Layout/ArgumentAlignment
|
480
486
|
|
481
487
|
def initialize
|
data/lib/jazzy/doc_builder.rb
CHANGED
@@ -183,7 +183,7 @@ module Jazzy
|
|
183
183
|
decls.map do |decl|
|
184
184
|
{
|
185
185
|
file: decl.file,
|
186
|
-
line: decl.
|
186
|
+
line: decl.start_line || decl.line,
|
187
187
|
symbol: decl.fully_qualified_name,
|
188
188
|
symbol_kind: decl.type.kind,
|
189
189
|
warning: 'undocumented',
|
@@ -236,6 +236,11 @@ module Jazzy
|
|
236
236
|
SourceKitten.autolink_document(html, doc_model)
|
237
237
|
end
|
238
238
|
|
239
|
+
def self.render_inline(doc_model, markdown)
|
240
|
+
html = Markdown.render_inline(markdown)
|
241
|
+
SourceKitten.autolink_document(html, doc_model)
|
242
|
+
end
|
243
|
+
|
239
244
|
# Build Mustache document - common fields between page types
|
240
245
|
def self.new_document(source_module, doc_model)
|
241
246
|
Doc.new.tap do |doc|
|
@@ -370,6 +375,8 @@ module Jazzy
|
|
370
375
|
deprecation_message: item.deprecation_message,
|
371
376
|
unavailable_message: item.unavailable_message,
|
372
377
|
usage_discouraged: item.usage_discouraged?,
|
378
|
+
async: item.async,
|
379
|
+
declaration_note: item.declaration_note,
|
373
380
|
}
|
374
381
|
end
|
375
382
|
# rubocop:enable Metrics/MethodLength
|
@@ -377,7 +384,7 @@ module Jazzy
|
|
377
384
|
def self.make_task(mark, uid, items, doc_model)
|
378
385
|
{
|
379
386
|
name: mark.name,
|
380
|
-
name_html: (
|
387
|
+
name_html: (render_inline(doc_model, mark.name) if mark.name),
|
381
388
|
uid: ERB::Util.url_encode(uid),
|
382
389
|
items: items,
|
383
390
|
pre_separator: mark.has_start_dash,
|
data/lib/jazzy/gem_version.rb
CHANGED
data/lib/jazzy/highlighter.rb
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
require 'rouge'
|
4
4
|
|
5
|
+
# While Rouge is downlevel (Rouge PR#1715 unreleased)
|
6
|
+
module Rouge
|
7
|
+
module Lexers
|
8
|
+
class Swift
|
9
|
+
prepend :root do
|
10
|
+
rule(/\b(?:async|await|isolated)\b/, Keyword)
|
11
|
+
rule(/\b(?:actor|nonisolated)\b/, Keyword::Declaration)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
5
17
|
module Jazzy
|
6
18
|
# This module helps highlight code
|
7
19
|
module Highlighter
|
data/lib/jazzy/jazzy_markdown.rb
CHANGED
@@ -40,7 +40,8 @@ module Jazzy
|
|
40
40
|
mapped = map_footnote(num)
|
41
41
|
"\n<li><div class='footnote-def' id=\"fn#{mapped}\">" +
|
42
42
|
text.sub(%r{(?=</p>)},
|
43
|
-
" <a href=\"#fnref#{mapped}\">↩</a
|
43
|
+
" <a href=\"#fnref#{mapped}\">↩</a>") +
|
44
|
+
'</div></li>'
|
44
45
|
end
|
45
46
|
end
|
46
47
|
|
@@ -66,7 +67,9 @@ module Jazzy
|
|
66
67
|
def codespan(text)
|
67
68
|
case text
|
68
69
|
when /^\$\$(.*)\$\$$/m
|
69
|
-
o = ["
|
70
|
+
o = ["</p><div class='math m-block'>",
|
71
|
+
Regexp.last_match[1],
|
72
|
+
'</div><p>']
|
70
73
|
Markdown.has_math = true
|
71
74
|
when /^\$(.*)\$$/m
|
72
75
|
o = ["<span class='math m-inline'>", Regexp.last_match[1], '</span>']
|
@@ -258,12 +261,19 @@ module Jazzy
|
|
258
261
|
@markdown ||= Redcarpet::Markdown.new(renderer, REDCARPET_OPTIONS)
|
259
262
|
end
|
260
263
|
|
264
|
+
# Produces <p>-delimited block content
|
261
265
|
def self.render(markdown_text, default_language = nil)
|
262
266
|
renderer.reset
|
263
267
|
renderer.default_language = default_language
|
264
268
|
markdown.render(markdown_text)
|
265
269
|
end
|
266
270
|
|
271
|
+
# Produces <span>-delimited inline content
|
272
|
+
def self.render_inline(markdown_text, default_language = nil)
|
273
|
+
render(markdown_text, default_language)
|
274
|
+
.sub(%r{^<p>(.*)</p>$}, '<span>\1</span>')
|
275
|
+
end
|
276
|
+
|
267
277
|
def self.rendered_returns
|
268
278
|
renderer.returns
|
269
279
|
end
|
@@ -275,7 +285,7 @@ module Jazzy
|
|
275
285
|
class JazzyCopyright < Redcarpet::Render::HTML
|
276
286
|
def link(link, _title, content)
|
277
287
|
%(<a class="link" href="#{link}" target="_blank" \
|
278
|
-
rel="noopener"
|
288
|
+
rel="external noopener">#{content}</a>)
|
279
289
|
end
|
280
290
|
end
|
281
291
|
|
@@ -12,11 +12,24 @@ module Jazzy
|
|
12
12
|
|
13
13
|
attr_reader :kind
|
14
14
|
|
15
|
-
def initialize(kind)
|
15
|
+
def initialize(kind, declaration = nil)
|
16
|
+
kind = fixup_kind(kind, declaration) if declaration
|
16
17
|
@kind = kind
|
17
18
|
@type = TYPES[kind]
|
18
19
|
end
|
19
20
|
|
21
|
+
# Improve kind from full declaration
|
22
|
+
def fixup_kind(kind, declaration)
|
23
|
+
if kind == 'source.lang.swift.decl.class' &&
|
24
|
+
declaration.include?(
|
25
|
+
'<syntaxtype.keyword>actor</syntaxtype.keyword>',
|
26
|
+
)
|
27
|
+
'source.lang.swift.decl.actor'
|
28
|
+
else
|
29
|
+
kind
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
20
33
|
def dash_type
|
21
34
|
@type && @type[:dash]
|
22
35
|
end
|
@@ -115,7 +128,8 @@ module Jazzy
|
|
115
128
|
end
|
116
129
|
|
117
130
|
def swift_extensible?
|
118
|
-
kind =~
|
131
|
+
kind =~
|
132
|
+
/^source\.lang\.swift\.decl\.(class|struct|protocol|enum|actor)$/
|
119
133
|
end
|
120
134
|
|
121
135
|
def swift_protocol?
|
@@ -255,6 +269,11 @@ module Jazzy
|
|
255
269
|
dash: 'Struct',
|
256
270
|
global: true,
|
257
271
|
}.freeze,
|
272
|
+
'sourcekitten.source.lang.objc.decl.union' => {
|
273
|
+
jazzy: 'Union',
|
274
|
+
dash: 'Union',
|
275
|
+
global: true,
|
276
|
+
}.freeze,
|
258
277
|
'sourcekitten.source.lang.objc.decl.field' => {
|
259
278
|
jazzy: 'Field',
|
260
279
|
dash: 'Field',
|
@@ -269,6 +288,11 @@ module Jazzy
|
|
269
288
|
}.freeze,
|
270
289
|
|
271
290
|
# Swift
|
291
|
+
'source.lang.swift.decl.actor' => {
|
292
|
+
jazzy: 'Actor',
|
293
|
+
dash: 'Actor',
|
294
|
+
global: true,
|
295
|
+
}.freeze,
|
272
296
|
'source.lang.swift.decl.function.accessor.address' => {
|
273
297
|
jazzy: 'Addressor',
|
274
298
|
dash: 'Function',
|
@@ -138,6 +138,7 @@ module Jazzy
|
|
138
138
|
attr_accessor :unavailable_message
|
139
139
|
attr_accessor :generic_requirements
|
140
140
|
attr_accessor :inherited_types
|
141
|
+
attr_accessor :async
|
141
142
|
|
142
143
|
def usage_discouraged?
|
143
144
|
unavailable || deprecated
|
@@ -188,6 +189,14 @@ module Jazzy
|
|
188
189
|
(swift? && usr && modulename.nil?)
|
189
190
|
end
|
190
191
|
|
192
|
+
# Info text for contents page by collapsed item name
|
193
|
+
def declaration_note
|
194
|
+
notes = [default_impl_abstract ? 'default implementation' : nil,
|
195
|
+
from_protocol_extension ? 'extension method' : nil,
|
196
|
+
async ? 'asynchronous' : nil].compact
|
197
|
+
notes.join(', ').humanize unless notes.empty?
|
198
|
+
end
|
199
|
+
|
191
200
|
def alternative_abstract
|
192
201
|
if file = alternative_abstract_file
|
193
202
|
Pathname(file).read
|
data/lib/jazzy/sourcekitten.rb
CHANGED
@@ -277,12 +277,18 @@ module Jazzy
|
|
277
277
|
declaration.children = []
|
278
278
|
end
|
279
279
|
|
280
|
+
def self.attribute?(doc, attr_name)
|
281
|
+
doc['key.attributes']&.find do |attribute|
|
282
|
+
attribute['key.attribute'] == "source.decl.attribute.#{attr_name}"
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
280
286
|
def self.availability_attribute?(doc)
|
281
|
-
|
287
|
+
attribute?(doc, 'available')
|
288
|
+
end
|
282
289
|
|
283
|
-
|
284
|
-
|
285
|
-
end.empty?
|
290
|
+
def self.spi_attribute?(doc)
|
291
|
+
attribute?(doc, '_spi')
|
286
292
|
end
|
287
293
|
|
288
294
|
def self.should_document?(doc)
|
@@ -302,10 +308,31 @@ module Jazzy
|
|
302
308
|
return false
|
303
309
|
end
|
304
310
|
|
305
|
-
#
|
311
|
+
# Only document @_spi declarations in some scenarios
|
312
|
+
return false unless should_document_spi?(doc)
|
313
|
+
|
314
|
+
# Don't document declarations excluded by the min_acl setting
|
315
|
+
if type.swift_extension?
|
316
|
+
should_document_swift_extension?(doc)
|
317
|
+
else
|
318
|
+
should_document_acl?(type, doc)
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
# Check visibility: SPI
|
323
|
+
def self.should_document_spi?(doc)
|
324
|
+
spi_ok = @min_acl < SourceDeclaration::AccessControlLevel.public ||
|
325
|
+
Config.instance.include_spi_declarations ||
|
326
|
+
(!spi_attribute?(doc) && !doc['key.symgraph_spi'])
|
327
|
+
|
328
|
+
@stats.add_spi_skipped unless spi_ok
|
329
|
+
spi_ok
|
330
|
+
end
|
331
|
+
|
332
|
+
# Check visibility: access control
|
333
|
+
def self.should_document_acl?(type, doc)
|
334
|
+
# Include all enum elements for now, can't tell their ACL.
|
306
335
|
return true if type.swift_enum_element?
|
307
|
-
# Document extensions if they might have parts covered by the ACL.
|
308
|
-
return should_document_swift_extension?(doc) if type.swift_extension?
|
309
336
|
|
310
337
|
acl_ok = SourceDeclaration::AccessControlLevel.from_doc(doc) >= @min_acl
|
311
338
|
unless acl_ok
|
@@ -315,6 +342,8 @@ module Jazzy
|
|
315
342
|
acl_ok
|
316
343
|
end
|
317
344
|
|
345
|
+
# Document extensions if they add protocol conformances, or have any
|
346
|
+
# member that needs to be documented.
|
318
347
|
def self.should_document_swift_extension?(doc)
|
319
348
|
doc['key.inheritedtypes'] ||
|
320
349
|
Array(doc['key.substructure']).any? do |subdoc|
|
@@ -495,6 +524,14 @@ module Jazzy
|
|
495
524
|
.join("\n")
|
496
525
|
end
|
497
526
|
|
527
|
+
# Exclude non-async routines that accept async closures
|
528
|
+
def self.swift_async?(fully_annotated_decl)
|
529
|
+
document = REXML::Document.new(fully_annotated_decl)
|
530
|
+
!document.elements['/*/syntaxtype.keyword[text()="async"]'].nil?
|
531
|
+
rescue StandardError
|
532
|
+
nil
|
533
|
+
end
|
534
|
+
|
498
535
|
# Strip default property attributes because libclang
|
499
536
|
# adds them all, even if absent in the original source code.
|
500
537
|
DEFAULT_ATTRIBUTES = %w[atomic readwrite assign unsafe_unretained].freeze
|
@@ -536,7 +573,9 @@ module Jazzy
|
|
536
573
|
end
|
537
574
|
declaration = SourceDeclaration.new
|
538
575
|
declaration.parent_in_code = parent
|
539
|
-
declaration.type =
|
576
|
+
declaration.type =
|
577
|
+
SourceDeclaration::Type.new(doc['key.kind'],
|
578
|
+
doc['key.fully_annotated_decl'])
|
540
579
|
declaration.typename = doc['key.typename']
|
541
580
|
declaration.objc_name = doc['key.name']
|
542
581
|
documented_name = if Config.instance.hide_objc? && doc['key.swift_name']
|
@@ -581,6 +620,11 @@ module Jazzy
|
|
581
620
|
inherited_types = doc['key.inheritedtypes'] || []
|
582
621
|
declaration.inherited_types =
|
583
622
|
inherited_types.map { |type| type['key.name'] }.compact
|
623
|
+
declaration.async =
|
624
|
+
doc['key.symgraph_async'] ||
|
625
|
+
if xml_declaration = doc['key.fully_annotated_decl']
|
626
|
+
swift_async?(xml_declaration)
|
627
|
+
end
|
584
628
|
|
585
629
|
next unless make_doc_info(doc, declaration)
|
586
630
|
|
@@ -790,7 +834,9 @@ module Jazzy
|
|
790
834
|
extensions.each do |ext|
|
791
835
|
ext.children = ext.children.select do |ext_member|
|
792
836
|
proto_member = protocol.children.find do |p|
|
793
|
-
p.name == ext_member.name &&
|
837
|
+
p.name == ext_member.name &&
|
838
|
+
p.type == ext_member.type &&
|
839
|
+
p.async == ext_member.async
|
794
840
|
end
|
795
841
|
|
796
842
|
# Extension-only method, keep.
|
data/lib/jazzy/stats.rb
CHANGED
@@ -5,7 +5,7 @@ module Jazzy
|
|
5
5
|
class Stats
|
6
6
|
include Config::Mixin
|
7
7
|
|
8
|
-
attr_reader :documented, :acl_skipped, :undocumented_decls
|
8
|
+
attr_reader :documented, :acl_skipped, :spi_skipped, :undocumented_decls
|
9
9
|
|
10
10
|
def add_documented
|
11
11
|
@documented += 1
|
@@ -15,6 +15,10 @@ module Jazzy
|
|
15
15
|
@acl_skipped += 1
|
16
16
|
end
|
17
17
|
|
18
|
+
def add_spi_skipped
|
19
|
+
@spi_skipped += 1
|
20
|
+
end
|
21
|
+
|
18
22
|
def add_undocumented(decl)
|
19
23
|
@undocumented_decls << decl
|
20
24
|
end
|
@@ -32,7 +36,7 @@ module Jazzy
|
|
32
36
|
end
|
33
37
|
|
34
38
|
def initialize
|
35
|
-
@documented = @acl_skipped = 0
|
39
|
+
@documented = @acl_skipped = @spi_skipped = 0
|
36
40
|
@undocumented_decls = []
|
37
41
|
end
|
38
42
|
|
@@ -54,6 +58,11 @@ module Jazzy
|
|
54
58
|
"#{symbol_or_symbols(acl_skipped)} " \
|
55
59
|
'(use `--min-acl` to specify a different minimum ACL)'
|
56
60
|
end
|
61
|
+
|
62
|
+
if spi_skipped > 0
|
63
|
+
puts "skipped #{spi_skipped} SPI #{symbol_or_symbols(spi_skipped)} " \
|
64
|
+
'(use `--include-spi-declarations` to include these)'
|
65
|
+
end
|
57
66
|
end
|
58
67
|
|
59
68
|
def doc_coverage
|
@@ -78,8 +78,13 @@ module Jazzy
|
|
78
78
|
|
79
79
|
# Protocol conformance is redundant if it's unconditional
|
80
80
|
# and already expressed in the type's declaration.
|
81
|
+
#
|
82
|
+
# Skip implementation-detail conformances.
|
81
83
|
def redundant_conformance?(rel, type, protocol)
|
82
|
-
|
84
|
+
return false unless type
|
85
|
+
|
86
|
+
(rel.constraints.empty? && type.conformance?(protocol)) ||
|
87
|
+
(type.actor? && rel.actor_protocol?)
|
83
88
|
end
|
84
89
|
|
85
90
|
# source is a member/protocol requirement of target
|
@@ -22,6 +22,12 @@ module Jazzy
|
|
22
22
|
kind == :defaultImplementationOf
|
23
23
|
end
|
24
24
|
|
25
|
+
# Protocol conformances added by compiler to actor decls that
|
26
|
+
# users aren't interested in.
|
27
|
+
def actor_protocol?
|
28
|
+
%w[Actor Sendable].include?(target_fallback)
|
29
|
+
end
|
30
|
+
|
25
31
|
def initialize(hash)
|
26
32
|
kind = hash[:kind]
|
27
33
|
unless KINDS.include?(kind)
|
@@ -25,6 +25,7 @@ module Jazzy
|
|
25
25
|
|
26
26
|
# A SymNode is a node of the reconstructed syntax tree holding a symbol.
|
27
27
|
# It can turn itself into SourceKit and helps decode extensions.
|
28
|
+
# rubocop:disable Metrics/ClassLength
|
28
29
|
class SymNode < BaseNode
|
29
30
|
attr_accessor :symbol
|
30
31
|
attr_writer :override
|
@@ -61,6 +62,10 @@ module Jazzy
|
|
61
62
|
symbol.kind.end_with?('protocol')
|
62
63
|
end
|
63
64
|
|
65
|
+
def actor?
|
66
|
+
symbol.kind.end_with?('actor')
|
67
|
+
end
|
68
|
+
|
64
69
|
def constraints
|
65
70
|
symbol.constraints
|
66
71
|
end
|
@@ -112,8 +117,13 @@ module Jazzy
|
|
112
117
|
" : #{superclass_name}"
|
113
118
|
end
|
114
119
|
|
120
|
+
# approximately...
|
121
|
+
def async?
|
122
|
+
symbol.declaration =~ /\basync\b[^)]*$/
|
123
|
+
end
|
124
|
+
|
115
125
|
def full_declaration
|
116
|
-
symbol.
|
126
|
+
symbol.attributes
|
117
127
|
.append(symbol.declaration + inherits_clause + where_clause)
|
118
128
|
.join("\n")
|
119
129
|
end
|
@@ -130,6 +140,7 @@ module Jazzy
|
|
130
140
|
'key.accessibility' => symbol.acl,
|
131
141
|
'key.parsed_decl' => declaration,
|
132
142
|
'key.annotated_decl' => xml_declaration,
|
143
|
+
'key.symgraph_async' => async?,
|
133
144
|
}
|
134
145
|
if docs = symbol.doc_comments
|
135
146
|
hash['key.doc.comment'] = docs
|
@@ -147,6 +158,7 @@ module Jazzy
|
|
147
158
|
unless children.empty?
|
148
159
|
hash['key.substructure'] = children_to_sourcekit
|
149
160
|
end
|
161
|
+
hash['key.symgraph_spi'] = true if symbol.spi
|
150
162
|
|
151
163
|
hash
|
152
164
|
end
|
@@ -159,5 +171,6 @@ module Jazzy
|
|
159
171
|
symbol <=> other.symbol
|
160
172
|
end
|
161
173
|
end
|
174
|
+
# rubocop:enable Metrics/ClassLength
|
162
175
|
end
|
163
176
|
end
|
@@ -10,10 +10,11 @@ module Jazzy
|
|
10
10
|
attr_accessor :declaration
|
11
11
|
attr_accessor :kind
|
12
12
|
attr_accessor :acl
|
13
|
+
attr_accessor :spi
|
13
14
|
attr_accessor :location # can be nil, keys :filename :line :character
|
14
15
|
attr_accessor :constraints # array, can be empty
|
15
16
|
attr_accessor :doc_comments # can be nil
|
16
|
-
attr_accessor :
|
17
|
+
attr_accessor :attributes # array, can be empty
|
17
18
|
attr_accessor :generic_type_params # set, can be empty
|
18
19
|
attr_accessor :parameter_names # array, can be nil
|
19
20
|
|
@@ -24,13 +25,14 @@ module Jazzy
|
|
24
25
|
def initialize(hash)
|
25
26
|
self.usr = hash[:identifier][:precise]
|
26
27
|
self.path_components = hash[:pathComponents]
|
27
|
-
raw_decl = hash[:declarationFragments]
|
28
|
-
init_kind(hash[:kind][:identifier])
|
28
|
+
raw_decl, keywords = parse_decl_fragments(hash[:declarationFragments])
|
29
|
+
init_kind(hash[:kind][:identifier], keywords)
|
29
30
|
init_declaration(raw_decl)
|
30
31
|
if func_signature = hash[:functionSignature]
|
31
32
|
init_func_signature(func_signature)
|
32
33
|
end
|
33
34
|
init_acl(hash[:accessLevel])
|
35
|
+
self.spi = hash[:spi]
|
34
36
|
if location = hash[:location]
|
35
37
|
init_location(location)
|
36
38
|
end
|
@@ -38,10 +40,20 @@ module Jazzy
|
|
38
40
|
if comments_hash = hash[:docComment]
|
39
41
|
init_doc_comments(comments_hash)
|
40
42
|
end
|
41
|
-
|
43
|
+
init_attributes(hash[:availability] || [])
|
42
44
|
init_generic_type_params(hash)
|
43
45
|
end
|
44
46
|
|
47
|
+
def parse_decl_fragments(fragments)
|
48
|
+
decl = ''
|
49
|
+
keywords = Set.new
|
50
|
+
fragments.each do |frag|
|
51
|
+
decl += frag[:spelling]
|
52
|
+
keywords.add(frag[:spelling]) if frag[:kind] == 'keyword'
|
53
|
+
end
|
54
|
+
[decl, keywords]
|
55
|
+
end
|
56
|
+
|
45
57
|
# Repair problems with SymbolGraph's declprinter
|
46
58
|
|
47
59
|
def init_declaration(raw_decl)
|
@@ -87,17 +99,22 @@ module Jazzy
|
|
87
99
|
'static.subscript' => 'function.subscript',
|
88
100
|
'typealias' => 'typealias',
|
89
101
|
'associatedtype' => 'associatedtype',
|
102
|
+
'actor' => 'actor',
|
90
103
|
}.freeze
|
91
104
|
|
92
105
|
# We treat 'static var' differently to 'class var'
|
93
|
-
|
94
|
-
|
106
|
+
# We treat actors as first-class entities
|
107
|
+
def adjust_kind_for_declaration(kind, keywords)
|
108
|
+
if kind == 'swift.class' && keywords.member?('actor')
|
109
|
+
return 'swift.actor'
|
110
|
+
end
|
111
|
+
return kind unless keywords.member?('static')
|
95
112
|
|
96
113
|
kind.gsub(/type/, 'static')
|
97
114
|
end
|
98
115
|
|
99
|
-
def init_kind(kind)
|
100
|
-
adjusted = adjust_kind_for_declaration(kind)
|
116
|
+
def init_kind(kind, keywords)
|
117
|
+
adjusted = adjust_kind_for_declaration(kind, keywords)
|
101
118
|
sourcekit_kind = KIND_MAP[adjusted.sub('swift.', '')]
|
102
119
|
raise "Unknown symbol kind '#{kind}'" unless sourcekit_kind
|
103
120
|
|
@@ -159,8 +176,8 @@ module Jazzy
|
|
159
176
|
# Availability
|
160
177
|
# Re-encode this as Swift. Should really teach Jazzy about these,
|
161
178
|
# could maybe then do something smarter here.
|
162
|
-
def
|
163
|
-
|
179
|
+
def availability_attributes(avail_hash_list)
|
180
|
+
avail_hash_list.map do |avail|
|
164
181
|
str = '@available('
|
165
182
|
if avail[:isUnconditionallyDeprecated]
|
166
183
|
str += '*, deprecated'
|
@@ -190,6 +207,15 @@ module Jazzy
|
|
190
207
|
str
|
191
208
|
end
|
192
209
|
|
210
|
+
def spi_attributes
|
211
|
+
spi ? ['@_spi(Unknown)'] : []
|
212
|
+
end
|
213
|
+
|
214
|
+
def init_attributes(avail_hash_list)
|
215
|
+
self.attributes =
|
216
|
+
availability_attributes(avail_hash_list) + spi_attributes
|
217
|
+
end
|
218
|
+
|
193
219
|
# Sort order
|
194
220
|
include Comparable
|
195
221
|
|
@@ -29,7 +29,7 @@
|
|
29
29
|
<div class="content-wrapper">
|
30
30
|
<p id="breadcrumbs">
|
31
31
|
<a href="{{path_to_root}}index.html">{{module_name}} Reference</a>
|
32
|
-
<img id="carat" src="{{path_to_root}}img/carat.png" />
|
32
|
+
<img id="carat" src="{{path_to_root}}img/carat.png" alt=""/>
|
33
33
|
{{name}} {{kind}} Reference
|
34
34
|
</p>
|
35
35
|
</div>
|
@@ -85,5 +85,4 @@
|
|
85
85
|
</article>
|
86
86
|
</div>
|
87
87
|
</body>
|
88
|
-
</div>
|
89
88
|
</html>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<section id="footer">
|
2
2
|
{{{copyright}}}
|
3
|
-
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="noopener"
|
3
|
+
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v{{jazzy_version}}</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
|
4
4
|
</section>
|
@@ -2,17 +2,17 @@
|
|
2
2
|
<div class="content-wrapper">
|
3
3
|
<p><a href="{{path_to_root}}index.html">{{docs_title}}</a>{{#doc_coverage}} ({{doc_coverage}}% documented){{/doc_coverage}}</p>
|
4
4
|
{{#source_host_url}}
|
5
|
-
<p class="header-right"><a href="{{.}}"><img src="{{path_to_root}}img/{{source_host_image}}"/>View on {{source_host_name}}</a></p>
|
5
|
+
<p class="header-right"><a href="{{.}}"><img src="{{path_to_root}}img/{{source_host_image}}" alt="{{source_host_name}}"/>View on {{source_host_name}}</a></p>
|
6
6
|
{{/source_host_url}}
|
7
7
|
{{#dash_url}}
|
8
|
-
<p class="header-right"><a href="{{dash_url}}"><img src="{{path_to_root}}img/dash.png"/>Install in Dash</a></p>
|
8
|
+
<p class="header-right"><a href="{{dash_url}}"><img src="{{path_to_root}}img/dash.png" alt="Dash"/>Install in Dash</a></p>
|
9
9
|
{{/dash_url}}
|
10
10
|
{{^disable_search}}
|
11
|
-
<
|
11
|
+
<div class="header-right">
|
12
12
|
<form role="search" action="{{path_to_root}}search.json">
|
13
13
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
14
14
|
</form>
|
15
|
-
</
|
15
|
+
</div>
|
16
16
|
{{/disable_search}}
|
17
17
|
</div>
|
18
18
|
</header>
|
@@ -28,16 +28,11 @@
|
|
28
28
|
<a class="token discouraged" href="#/{{usr}}">{{{name_html}}}</a>
|
29
29
|
{{/usage_discouraged}}
|
30
30
|
</code>
|
31
|
-
{{#
|
31
|
+
{{#declaration_note}}
|
32
32
|
<span class="declaration-note">
|
33
|
-
|
33
|
+
{{.}}
|
34
34
|
</span>
|
35
|
-
{{/
|
36
|
-
{{#from_protocol_extension}}
|
37
|
-
<span class="declaration-note">
|
38
|
-
Extension method
|
39
|
-
</span>
|
40
|
-
{{/from_protocol_extension}}
|
35
|
+
{{/declaration_note}}
|
41
36
|
</div>
|
42
37
|
<div class="height-container">
|
43
38
|
<div class="pointer-container"></div>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
<p class="breadcrumbs">
|
34
34
|
<a class="breadcrumb" href="{{path_to_root}}index.html">{{module_name}} Reference</a>
|
35
|
-
<img class="carat" src="{{path_to_root}}img/carat.png" />
|
35
|
+
<img class="carat" src="{{path_to_root}}img/carat.png" alt=""/>
|
36
36
|
{{name}} {{kind}} Reference
|
37
37
|
</p>
|
38
38
|
|
@@ -91,5 +91,4 @@
|
|
91
91
|
</div>
|
92
92
|
{{> footer}}
|
93
93
|
</body>
|
94
|
-
</div>
|
95
94
|
</html>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<section class="footer">
|
2
2
|
{{{copyright}}}
|
3
|
-
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="noopener"
|
3
|
+
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v{{jazzy_version}}</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
|
4
4
|
</section>
|
@@ -7,17 +7,17 @@
|
|
7
7
|
</p>
|
8
8
|
|
9
9
|
{{^disable_search}}
|
10
|
-
<
|
10
|
+
<div class="header-col--secondary">
|
11
11
|
<form role="search" action="{{path_to_root}}search.json">
|
12
12
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
13
13
|
</form>
|
14
|
-
</
|
14
|
+
</div>
|
15
15
|
{{/disable_search}}
|
16
16
|
|
17
17
|
{{#source_host_url}}
|
18
18
|
<p class="header-col header-col--secondary">
|
19
19
|
<a class="header-link" href="{{.}}">
|
20
|
-
<img class="header-icon" src="{{path_to_root}}img/{{source_host_image}}"/>
|
20
|
+
<img class="header-icon" src="{{path_to_root}}img/{{source_host_image}}" alt="{{source_host_name}}"/>
|
21
21
|
View on {{source_host_name}}
|
22
22
|
</a>
|
23
23
|
</p>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
{{#dash_url}}
|
27
27
|
<p class="header-col header-col--secondary">
|
28
28
|
<a class="header-link" href="{{dash_url}}">
|
29
|
-
<img class="header-icon" src="{{path_to_root}}img/dash.png"/>
|
29
|
+
<img class="header-icon" src="{{path_to_root}}img/dash.png" alt="Dash"/>
|
30
30
|
Install in Dash
|
31
31
|
</a>
|
32
32
|
</p>
|
@@ -28,16 +28,11 @@
|
|
28
28
|
<a class="token discouraged" href="#/{{usr}}">{{{name_html}}}</a>
|
29
29
|
{{/usage_discouraged}}
|
30
30
|
</code>
|
31
|
-
{{#
|
31
|
+
{{#declaration_note}}
|
32
32
|
<span class="declaration-note">
|
33
|
-
|
33
|
+
{{.}}
|
34
34
|
</span>
|
35
|
-
{{/
|
36
|
-
{{#from_protocol_extension}}
|
37
|
-
<span class="declaration-note">
|
38
|
-
Extension method
|
39
|
-
</span>
|
40
|
-
{{/from_protocol_extension}}
|
35
|
+
{{/declaration_note}}
|
41
36
|
</div>
|
42
37
|
<div class="height-container">
|
43
38
|
<div class="pointer-container"></div>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<p id="breadcrumbs">
|
28
28
|
<span class="no-mobile">
|
29
29
|
<a href="{{path_to_root}}index.html">{{module_name}} Reference</a>
|
30
|
-
<img id="carat" src="{{path_to_root}}img/carat.png" />
|
30
|
+
<img id="carat" src="{{path_to_root}}img/carat.png" alt=""/>
|
31
31
|
</span>
|
32
32
|
{{name}} {{kind}} Reference
|
33
33
|
</p>
|
@@ -91,5 +91,4 @@
|
|
91
91
|
</div>
|
92
92
|
</div>
|
93
93
|
</body>
|
94
|
-
</div>
|
95
94
|
</html>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<section id="footer">
|
2
2
|
{{{copyright}}}
|
3
|
-
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="noopener"
|
3
|
+
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v{{jazzy_version}}</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
|
4
4
|
</section>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
{{#source_host_url}}
|
9
9
|
<p class="header-right">
|
10
10
|
<a href="{{.}}">
|
11
|
-
<img src="{{path_to_root}}img/{{source_host_image}}"/>
|
11
|
+
<img src="{{path_to_root}}img/{{source_host_image}}" alt="{{source_host_name}}"/>
|
12
12
|
<span class="no-mobile">View on {{source_host_name}}</span>
|
13
13
|
</a>
|
14
14
|
</p>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
{{#dash_url}}
|
18
18
|
<p class="header-right">
|
19
19
|
<a href="{{dash_url}}">
|
20
|
-
<img src="{{path_to_root}}img/dash.png"/>
|
20
|
+
<img src="{{path_to_root}}img/dash.png" alt="Dash"/>
|
21
21
|
<span class="no-mobile">Install in Dash</span>
|
22
22
|
</a>
|
23
23
|
</p>
|
@@ -28,16 +28,11 @@
|
|
28
28
|
<a class="token discouraged" href="#/{{usr}}">{{{name_html}}}</a>
|
29
29
|
{{/usage_discouraged}}
|
30
30
|
</code>
|
31
|
-
{{#
|
31
|
+
{{#declaration_note}}
|
32
32
|
<span class="declaration-note">
|
33
|
-
|
33
|
+
{{.}}
|
34
34
|
</span>
|
35
|
-
{{/
|
36
|
-
{{#from_protocol_extension}}
|
37
|
-
<span class="declaration-note">
|
38
|
-
Extension method
|
39
|
-
</span>
|
40
|
-
{{/from_protocol_extension}}
|
35
|
+
{{/declaration_note}}
|
41
36
|
</div>
|
42
37
|
<div class="height-container">
|
43
38
|
<div class="pointer-container"></div>
|
data/spec/integration_spec.rb
CHANGED
@@ -188,9 +188,10 @@ describe_cli 'jazzy' do
|
|
188
188
|
describe 'Creates docs with a module name, author name, project URL, ' \
|
189
189
|
'xcodebuild options, and github info' do
|
190
190
|
behaves_like cli_spec 'document_alamofire',
|
191
|
-
'--skip-undocumented'
|
192
|
-
|
193
|
-
|
191
|
+
'--skip-undocumented ' \
|
192
|
+
'--clean ' \
|
193
|
+
'--xcodebuild-arguments ' \
|
194
|
+
"-destination,'platform=OS X'"
|
194
195
|
end
|
195
196
|
|
196
197
|
describe 'Creates Realm Swift docs' do
|
@@ -210,7 +211,8 @@ describe_cli 'jazzy' do
|
|
210
211
|
'--root-url https://realm.io/docs/swift/' \
|
211
212
|
"#{realm_version}/api/ " \
|
212
213
|
'--xcodebuild-arguments ' \
|
213
|
-
'-scheme,RealmSwift,SWIFT_VERSION=4.2
|
214
|
+
'-scheme,RealmSwift,SWIFT_VERSION=4.2,' \
|
215
|
+
"-destination,'platform=OS X' " \
|
214
216
|
"--head #{realm_head.shellescape}"
|
215
217
|
end
|
216
218
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jazzy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Simard
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-10-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: cocoapods
|