Skip to content

Commit 3d160f6

Browse files
committed
applying swift format
1 parent 50aabbe commit 3d160f6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Tools/generate-docc-reference/Extensions/ArgumentParser+Markdown.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ extension CommandInfoV0 {
4949

5050
// sets the max width for generating code blocks of content based
5151
// on the style
52-
let blockWrapLength: Int = switch (markdownStyle) {
52+
let blockWrapLength: Int =
53+
switch markdownStyle {
5354
case .docc: 60
5455
case .github: 80
55-
}
56-
56+
}
57+
5758
if path.count == 0 {
5859
result += "<!-- Generated by swift-argument-parser -->\n\n"
5960
}
@@ -65,7 +66,10 @@ extension CommandInfoV0 {
6566
if let args = self.arguments, args.count != 0 {
6667
result += "```\n"
6768
let commandString = (path + [self.commandName]).joined(separator: " ")
68-
result += commandString + self.usage(startlength: commandString.count, wraplength: blockWrapLength)
69+
result +=
70+
commandString
71+
+ self.usage(
72+
startlength: commandString.count, wraplength: blockWrapLength)
6973
result += "\n```\n\n"
7074
}
7175

@@ -104,7 +108,7 @@ extension CommandInfoV0 {
104108

105109
return result
106110
}
107-
111+
108112
/// Returns a mutl-line string that presents the arguments for a command.
109113
/// - Parameters:
110114
/// - startlength: The starting width of the line this multi-line string appends onto.
@@ -124,7 +128,7 @@ extension CommandInfoV0 {
124128
if currentLength + arg.usage().count > wraplength {
125129
// the next usage() string exceeds the max width, wrap it.
126130
multilineString.append("\n \(nextUsage)")
127-
currentLength = nextUsage.count + 2 // prepend spacing length of 2
131+
currentLength = nextUsage.count + 2 // prepend spacing length of 2
128132
} else {
129133
// the next usage() string doesn't exceed the max width
130134
multilineString.append(" \(nextUsage)")

0 commit comments

Comments
 (0)