@@ -49,11 +49,12 @@ extension CommandInfoV0 {
49
49
50
50
// sets the max width for generating code blocks of content based
51
51
// on the style
52
- let blockWrapLength : Int = switch ( markdownStyle) {
52
+ let blockWrapLength : Int =
53
+ switch markdownStyle {
53
54
case . docc: 60
54
55
case . github: 80
55
- }
56
-
56
+ }
57
+
57
58
if path. count == 0 {
58
59
result += " <!-- Generated by swift-argument-parser --> \n \n "
59
60
}
@@ -65,7 +66,10 @@ extension CommandInfoV0 {
65
66
if let args = self . arguments, args. count != 0 {
66
67
result += " ``` \n "
67
68
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)
69
73
result += " \n ``` \n \n "
70
74
}
71
75
@@ -104,7 +108,7 @@ extension CommandInfoV0 {
104
108
105
109
return result
106
110
}
107
-
111
+
108
112
/// Returns a mutl-line string that presents the arguments for a command.
109
113
/// - Parameters:
110
114
/// - startlength: The starting width of the line this multi-line string appends onto.
@@ -124,7 +128,7 @@ extension CommandInfoV0 {
124
128
if currentLength + arg. usage ( ) . count > wraplength {
125
129
// the next usage() string exceeds the max width, wrap it.
126
130
multilineString. append ( " \n \( nextUsage) " )
127
- currentLength = nextUsage. count + 2 // prepend spacing length of 2
131
+ currentLength = nextUsage. count + 2 // prepend spacing length of 2
128
132
} else {
129
133
// the next usage() string doesn't exceed the max width
130
134
multilineString. append ( " \( nextUsage) " )
0 commit comments