Skip to content

Commit fa6f077

Browse files
committed
refactor: update markdown headers to align with DocC formatting
1 parent 49f9f69 commit fa6f077

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

Tests/ArgumentParserGenerateDoccReferenceTests/Snapshots/testColorDoccReference().md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
color --fav=<fav> [--second=<second>] [--help]
77
```
88

9-
## Flags
9+
### Flags
1010

1111
**`--help`**
1212

1313
*Show help information.*
1414

1515

16-
## Options
16+
### Options
1717

1818
**`--fav=\<fav\>`**
1919

@@ -35,6 +35,6 @@ Show subcommand help information.
3535
color help [<subcommands>...]
3636
```
3737

38-
## Arguments
38+
### Arguments
3939

4040
**`subcommands`**

Tests/ArgumentParserGenerateDoccReferenceTests/Snapshots/testCountLinesDoccReference().md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
count-lines [<input-file>] [--prefix=<prefix>] [--verbose] [--help]
77
```
88

9-
## Arguments
9+
### Arguments
1010

1111
**`input-file`**
1212

1313
*A file to count lines in. If omitted, counts the lines of stdin.*
1414

1515

16-
## Flags
16+
### Flags
1717

1818
**`--verbose`**
1919

@@ -25,7 +25,7 @@ count-lines [<input-file>] [--prefix=<prefix>] [--verbose] [--help]
2525
*Show help information.*
2626

2727

28-
## Options
28+
### Options
2929

3030
**`--prefix=\<prefix\>`**
3131

@@ -40,6 +40,6 @@ Show subcommand help information.
4040
count-lines help [<subcommands>...]
4141
```
4242

43-
## Arguments
43+
### Arguments
4444

4545
**`subcommands`**

Tests/ArgumentParserGenerateDoccReferenceTests/Snapshots/testMathDoccReference().md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A utility for performing maths.
88
math [--version] [--help]
99
```
1010

11-
## Flags
11+
### Flags
1212

1313
**`--version`**
1414

@@ -28,14 +28,14 @@ Print the sum of the values.
2828
math add [--hex-output] [<values>...] [--version] [--help]
2929
```
3030

31-
## Arguments
31+
### Arguments
3232

3333
**`values`**
3434

3535
*A group of integers to operate on.*
3636

3737

38-
## Flags
38+
### Flags
3939

4040
**`--hex-output`**
4141

@@ -59,14 +59,14 @@ Print the product of the values.
5959
math multiply [--hex-output] [<values>...] [--version] [--help]
6060
```
6161

62-
## Arguments
62+
### Arguments
6363

6464
**`values`**
6565

6666
*A group of integers to operate on.*
6767

6868

69-
## Flags
69+
### Flags
7070

7171
**`--hex-output`**
7272

@@ -90,7 +90,7 @@ Calculate descriptive statistics.
9090
math stats [--version] [--help]
9191
```
9292

93-
## Flags
93+
### Flags
9494

9595
**`--version`**
9696

@@ -110,14 +110,14 @@ Print the average of the values.
110110
math stats average [--kind=<kind>] [<values>...] [--version] [--help]
111111
```
112112

113-
## Arguments
113+
### Arguments
114114

115115
**`values`**
116116

117117
*A group of floating-point values to operate on.*
118118

119119

120-
## Flags
120+
### Flags
121121

122122
**`--version`**
123123

@@ -129,7 +129,7 @@ math stats average [--kind=<kind>] [<values>...] [--version] [--help]
129129
*Show help information.*
130130

131131

132-
## Options
132+
### Options
133133

134134
**`--kind=\<kind\>`**
135135

@@ -143,14 +143,14 @@ Print the standard deviation of the values.
143143
math stats stdev [<values>...] [--version] [--help]
144144
```
145145

146-
## Arguments
146+
### Arguments
147147

148148
**`values`**
149149

150150
*A group of floating-point values to operate on.*
151151

152152

153-
## Flags
153+
### Flags
154154

155155
**`--version`**
156156

@@ -169,7 +169,7 @@ Print the quantiles of the values (TBD).
169169
math stats quantiles [<one-of-four>] [<custom-arg>] [<values>...] [--file=<file>] [--directory=<directory>] [--shell=<shell>] [--custom=<custom>] [--version] [--help]
170170
```
171171

172-
## Arguments
172+
### Arguments
173173

174174
**`one-of-four`**
175175

@@ -182,7 +182,7 @@ math stats quantiles [<one-of-four>] [<custom-arg>] [<values>...] [--file=<f
182182
*A group of floating-point values to operate on.*
183183

184184

185-
## Flags
185+
### Flags
186186

187187
**`--version`**
188188

@@ -194,7 +194,7 @@ math stats quantiles [<one-of-four>] [<custom-arg>] [<values>...] [--file=<f
194194
*Show help information.*
195195

196196

197-
## Options
197+
### Options
198198

199199
**`--file=\<file\>`**
200200

@@ -215,6 +215,6 @@ Show subcommand help information.
215215
math help [<subcommands>...]
216216
```
217217

218-
## Arguments
218+
### Arguments
219219

220220
**`subcommands`**

Tests/ArgumentParserGenerateDoccReferenceTests/Snapshots/testRepeatDoccReference().md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
repeat [--count=<count>] [--include-counter] <phrase> [--help]
77
```
88

9-
## Arguments
9+
### Arguments
1010

1111
**`phrase`**
1212

1313
*The phrase to repeat.*
1414

1515

16-
## Flags
16+
### Flags
1717

1818
**`--include-counter`**
1919

@@ -25,7 +25,7 @@ repeat [--count=<count>] [--include-counter] <phrase> [--help]
2525
*Show help information.*
2626

2727

28-
## Options
28+
### Options
2929

3030
**`--count=\<count\>`**
3131

@@ -40,6 +40,6 @@ Show subcommand help information.
4040
repeat help [<subcommands>...]
4141
```
4242

43-
## Arguments
43+
### Arguments
4444

4545
**`subcommands`**

Tests/ArgumentParserGenerateDoccReferenceTests/Snapshots/testRollDoccReference().md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
roll [--times=<n>] [--sides=<m>] [--seed=<seed>] [--verbose] [--help]
77
```
88

9-
## Flags
9+
### Flags
1010

1111
**`--verbose`**
1212

@@ -18,7 +18,7 @@ roll [--times=<n>] [--sides=<m>] [--seed=<seed>] [--verbose] [--help]
1818
*Show help information.*
1919

2020

21-
## Options
21+
### Options
2222

2323
**`--times=\<n\>`**
2424

@@ -45,6 +45,6 @@ Show subcommand help information.
4545
roll help [<subcommands>...]
4646
```
4747

48-
## Arguments
48+
### Arguments
4949

5050
**`subcommands`**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ extension CommandInfoV0 {
7474
// Add section title as a Markdown header to the result
7575
// Adding section titles as Markdown headers helps separate sections in the documentation,
7676
// making it easier for users to navigate and understand the structure of the arguments.
77-
result += "## \(section)\n\n"
77+
result += "### \(section)\n\n"
7878

7979
// Iterate through each argument in the section
8080
// Iterating through each argument allows us to add details for each argument under its respective section.

0 commit comments

Comments
 (0)