Skip to content

Commit a74300e

Browse files
committed
format
1 parent 943ea79 commit a74300e

File tree

166 files changed

+628
-635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+628
-635
lines changed

Sources/MarkdownSemantics/MarkdownInterpreter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ extension MarkdownInterpreter
7878
{
7979
if case (let heading as MarkdownBlock.Heading) = block, heading.level == 3
8080
{
81-
return true
81+
true
8282
}
8383
else
8484
{
85-
return false
85+
false
8686
}
8787
}
8888

Sources/MarkdownSemantics/Prefixes/MarkdownKeywordPrefix.swift

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,32 @@ extension MarkdownKeywordPrefix
3737
{
3838
switch self
3939
{
40-
case .attention: return MarkdownBlock.Aside.Attention.init(discussion)
41-
case .author: return MarkdownBlock.Aside.Author.init(discussion)
42-
case .authors: return MarkdownBlock.Aside.Authors.init(discussion)
43-
case .bug: return MarkdownBlock.Aside.Bug.init(discussion)
44-
case .complexity: return MarkdownBlock.Aside.Complexity.init(discussion)
45-
case .copyright: return MarkdownBlock.Aside.Copyright.init(discussion)
46-
case .date: return MarkdownBlock.Aside.Date.init(discussion)
47-
case .experiment: return MarkdownBlock.Aside.Experiment.init(discussion)
48-
case .important: return MarkdownBlock.Aside.Important.init(discussion)
49-
case .invariant: return MarkdownBlock.Aside.Invariant.init(discussion)
50-
case .mutating: return MarkdownBlock.Aside.Mutating.init(discussion)
51-
case .nonmutating: return MarkdownBlock.Aside.Nonmutating.init(discussion)
52-
case .note: return MarkdownBlock.Aside.Note.init(discussion)
53-
case .parameters: return MarkdownBlock.Parameters.init(discussion)
54-
case .postcondition: return MarkdownBlock.Aside.Postcondition.init(discussion)
55-
case .precondition: return MarkdownBlock.Aside.Precondition.init(discussion)
56-
case .remark: return MarkdownBlock.Aside.Remark.init(discussion)
57-
case .requires: return MarkdownBlock.Aside.Requires.init(discussion)
58-
case .returns: return MarkdownBlock.Aside.Returns.init(discussion)
59-
case .seealso: return MarkdownBlock.Aside.SeeAlso.init(discussion)
60-
case .since: return MarkdownBlock.Aside.Since.init(discussion)
61-
case .throws: return MarkdownBlock.Aside.Throws.init(discussion)
62-
case .tip: return MarkdownBlock.Aside.Tip.init(discussion)
63-
case .todo: return MarkdownBlock.Aside.ToDo.init(discussion)
64-
case .version: return MarkdownBlock.Aside.Version.init(discussion)
65-
case .warning: return MarkdownBlock.Aside.Warning.init(discussion)
40+
case .attention: MarkdownBlock.Aside.Attention.init(discussion)
41+
case .author: MarkdownBlock.Aside.Author.init(discussion)
42+
case .authors: MarkdownBlock.Aside.Authors.init(discussion)
43+
case .bug: MarkdownBlock.Aside.Bug.init(discussion)
44+
case .complexity: MarkdownBlock.Aside.Complexity.init(discussion)
45+
case .copyright: MarkdownBlock.Aside.Copyright.init(discussion)
46+
case .date: MarkdownBlock.Aside.Date.init(discussion)
47+
case .experiment: MarkdownBlock.Aside.Experiment.init(discussion)
48+
case .important: MarkdownBlock.Aside.Important.init(discussion)
49+
case .invariant: MarkdownBlock.Aside.Invariant.init(discussion)
50+
case .mutating: MarkdownBlock.Aside.Mutating.init(discussion)
51+
case .nonmutating: MarkdownBlock.Aside.Nonmutating.init(discussion)
52+
case .note: MarkdownBlock.Aside.Note.init(discussion)
53+
case .parameters: MarkdownBlock.Parameters.init(discussion)
54+
case .postcondition: MarkdownBlock.Aside.Postcondition.init(discussion)
55+
case .precondition: MarkdownBlock.Aside.Precondition.init(discussion)
56+
case .remark: MarkdownBlock.Aside.Remark.init(discussion)
57+
case .requires: MarkdownBlock.Aside.Requires.init(discussion)
58+
case .returns: MarkdownBlock.Aside.Returns.init(discussion)
59+
case .seealso: MarkdownBlock.Aside.SeeAlso.init(discussion)
60+
case .since: MarkdownBlock.Aside.Since.init(discussion)
61+
case .throws: MarkdownBlock.Aside.Throws.init(discussion)
62+
case .tip: MarkdownBlock.Aside.Tip.init(discussion)
63+
case .todo: MarkdownBlock.Aside.ToDo.init(discussion)
64+
case .version: MarkdownBlock.Aside.Version.init(discussion)
65+
case .warning: MarkdownBlock.Aside.Warning.init(discussion)
6666
}
6767
}
6868
}

Sources/MarkdownSemantics/Sources/MarkdownInline.Autolink (ext).swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Sources
21
import MarkdownAST
2+
import Sources
33
import UnidocDiagnostics
44

55
extension MarkdownInline.Autolink:DiagnosticSubject
@@ -11,11 +11,11 @@ extension MarkdownInline.Autolink:DiagnosticSubject
1111
if let base:SourceLocation<Int32> = self.source.file.location,
1212
let offset:Range<SourcePosition> = self.source.range
1313
{
14-
return base.translated(by: offset.lowerBound)
14+
base.translated(by: offset.lowerBound)
1515
}
1616
else
1717
{
18-
return nil
18+
nil
1919
}
2020
}
2121

Sources/MarkdownSemantics/Sources/MarkdownSource (ext).swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Sources
21
import MarkdownAST
2+
import Sources
33
import UnidocDiagnostics
44

55
extension MarkdownSource

Sources/Media/MediaSubtype.swift

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -75,32 +75,32 @@ extension MediaSubtype
7575
{
7676
switch self
7777
{
78-
case .apng: return "apng"
79-
case .avif: return "avif"
80-
case .bson: return "bson"
81-
case .css: return "css"
82-
case .gif: return "gif"
83-
case .html: return "html"
84-
case .javascript: return "js"
85-
case .jpeg: return "jpeg"
86-
case .json: return "json"
87-
case .markdown: return "md"
88-
case .octet_stream: return "bin"
89-
case .ogg: return "ogg"
90-
case .otf: return "otf"
91-
case .plain: return "txt"
92-
case .png: return "png"
93-
case .rss: return "rss"
94-
case .svg: return "svg"
95-
case .ttf: return "ttf"
96-
case .wav: return "wav"
97-
case .webm: return "webm"
98-
case .webp: return "webp"
99-
case .woff: return "woff"
100-
case .woff2: return "woff2"
101-
case .xml: return "xml"
102-
case .x_icon: return "ico"
103-
case .x_www_form_urlencoded: return "txt"
78+
case .apng: "apng"
79+
case .avif: "avif"
80+
case .bson: "bson"
81+
case .css: "css"
82+
case .gif: "gif"
83+
case .html: "html"
84+
case .javascript: "js"
85+
case .jpeg: "jpeg"
86+
case .json: "json"
87+
case .markdown: "md"
88+
case .octet_stream: "bin"
89+
case .ogg: "ogg"
90+
case .otf: "otf"
91+
case .plain: "txt"
92+
case .png: "png"
93+
case .rss: "rss"
94+
case .svg: "svg"
95+
case .ttf: "ttf"
96+
case .wav: "wav"
97+
case .webm: "webm"
98+
case .webp: "webp"
99+
case .woff: "woff"
100+
case .woff2: "woff2"
101+
case .xml: "xml"
102+
case .x_icon: "ico"
103+
case .x_www_form_urlencoded: "txt"
104104
}
105105
}
106106
}

Sources/Media/MediaType.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,46 +17,46 @@ extension MediaType:CustomStringConvertible
1717
switch self
1818
{
1919
case .application(let subtype, charset: nil):
20-
return "application/\(subtype)"
20+
"application/\(subtype)"
2121

2222
case .application(let subtype, charset: let encoding?):
23-
return "application/\(subtype); charset=\(encoding)"
23+
"application/\(subtype); charset=\(encoding)"
2424

2525
case .audio (let subtype, charset: nil):
26-
return "audio/\(subtype)"
26+
"audio/\(subtype)"
2727

2828
case .audio (let subtype, charset: let encoding?):
29-
return "audio/\(subtype); charset=\(encoding)"
29+
"audio/\(subtype); charset=\(encoding)"
3030

3131
case .font (let subtype, charset: nil):
32-
return "font/\(subtype)"
32+
"font/\(subtype)"
3333

3434
case .font (let subtype, charset: let encoding?):
35-
return "font/\(subtype); charset=\(encoding)"
35+
"font/\(subtype); charset=\(encoding)"
3636

3737
case .image (let subtype, charset: nil):
38-
return "image/\(subtype)"
38+
"image/\(subtype)"
3939

4040
case .image (let subtype, charset: let encoding?):
41-
return "image/\(subtype); charset=\(encoding)"
41+
"image/\(subtype); charset=\(encoding)"
4242

4343
case .model (let subtype, charset: nil):
44-
return "model/\(subtype)"
44+
"model/\(subtype)"
4545

4646
case .model (let subtype, charset: let encoding?):
47-
return "model/\(subtype); charset=\(encoding)"
47+
"model/\(subtype); charset=\(encoding)"
4848

4949
case .text (let subtype, charset: nil):
50-
return "text/\(subtype)"
50+
"text/\(subtype)"
5151

5252
case .text (let subtype, charset: let encoding?):
53-
return "text/\(subtype); charset=\(encoding)"
53+
"text/\(subtype); charset=\(encoding)"
5454

5555
case .video (let subtype, charset: nil):
56-
return "video/\(subtype)"
56+
"video/\(subtype)"
5757

5858
case .video (let subtype, charset: let encoding?):
59-
return "video/\(subtype); charset=\(encoding)"
59+
"video/\(subtype); charset=\(encoding)"
6060
}
6161
}
6262
}

Sources/Media/MultipartType.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ extension MultipartType:CustomStringConvertible
2020
switch self
2121
{
2222
case .byteranges(boundary: let boundary?):
23-
return "multipart/byteranges; boundary=\(boundary)"
23+
"multipart/byteranges; boundary=\(boundary)"
2424

2525
case .byteranges(boundary: nil):
26-
return "multipart/byteranges"
26+
"multipart/byteranges"
2727

2828
case .form_data(boundary: let boundary?):
29-
return "multipart/form-data; boundary=\(boundary)"
29+
"multipart/form-data; boundary=\(boundary)"
3030

3131
case .form_data(boundary: nil):
32-
return "multipart/form-data"
32+
"multipart/form-data"
3333
}
3434
}
3535
}

Sources/Multiparts/Metadata/ContentDisposition.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ extension ContentDisposition:CustomStringConvertible
3030
switch self
3131
{
3232
case .inline:
33-
return "inline"
33+
"inline"
3434

3535
case .attachment(filename: nil):
36-
return "attachment"
36+
"attachment"
3737
case .attachment(filename: let filename?):
38-
return "attachment; filename=\(Self.escape(filename))"
38+
"attachment; filename=\(Self.escape(filename))"
3939

4040
case .formData(filename: nil, name: let name):
41-
return "form-data; name=\(Self.escape(name))"
41+
"form-data; name=\(Self.escape(name))"
4242
case .formData(filename: let filename?, name: let name):
43-
return "form-data; name=\(Self.escape(name)); filename=\(Self.escape(filename))"
43+
"form-data; name=\(Self.escape(name)); filename=\(Self.escape(filename))"
4444
}
4545
}
4646
}

Sources/Multiparts/Metadata/ContentType.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ extension ContentType
1313
{
1414
switch self
1515
{
16-
case .multipart(let type): return type
17-
case .media: return nil
16+
case .multipart(let type): type
17+
case .media: nil
1818
}
1919
}
2020
@inlinable public
2121
var media:MediaType?
2222
{
2323
switch self
2424
{
25-
case .multipart: return nil
26-
case .media(let type): return type
25+
case .multipart: nil
26+
case .media(let type): type
2727
}
2828
}
2929
}
@@ -34,8 +34,8 @@ extension ContentType:CustomStringConvertible
3434
{
3535
switch self
3636
{
37-
case .multipart(let type): return type.description
38-
case .media(let type): return type.description
37+
case .multipart(let type): type.description
38+
case .media(let type): type.description
3939
}
4040
}
4141
}

Sources/Multiparts/Parsing/HorizontalWhitespaceRule.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ enum HorizontalWhitespaceRule<Location>:TerminalRule
1212
switch terminal
1313
{
1414
case 0x09, 0x20: // '\t', ' '
15-
return ()
15+
()
1616
default:
17-
return nil
17+
nil
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)