Skip to content

Commit 7ee83b6

Browse files
committed
Fix default formatting
1 parent 0ddea3b commit 7ee83b6

15 files changed

+15
-55
lines changed

lib/output/markdown_ast.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function commentsToAST(comments, opts, callback) {
3737
!!param.type && u('strong', [u('text', formatType(param.type))]),
3838
u('text', ' '),
3939
mdast.parse(formatInlineTags(param.description)),
40-
!!param.default && u('root', [
40+
!!param.default && u('paragraph', [
4141
u('text', ' (optional, default '),
4242
u('inlineCode', param.default),
4343
u('text', ')')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@
7575
"scripts": {
7676
"lint": "eslint bin lib index.js test",
7777
"doc": "documentation index.js -f md > docs/NODE_API.md",
78-
"test": "npm run lint && tap -t 120 -R tap --coverage test/*.js test/lib test/misc test/streams"
78+
"test": "npm run lint && tap -t 120 --coverage test/*.js test/lib test/misc test/streams"
7979
}
8080
}

test/fixture/bad/syntax.output.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"column": 0
66
},
77
"_babel": true
8-
}
8+
}

test/fixture/default-param.output.custom.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ Very Important Transform
66
**Parameters**
77

88
- `foo`
9-
(optional, default
10-
11-
`'bar'`
12-
13-
)
14-
9+
(optional, default `'bar'`)
1510

1611

test/fixture/default-param.output.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ Very Important Transform
66
**Parameters**
77

88
- `foo`
9-
(optional, default
10-
11-
`'bar'`
12-
13-
)
14-
9+
(optional, default `'bar'`)
1510

1611

test/fixture/default-param.output.md.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
}
110110
},
111111
{
112-
"type": "root",
112+
"type": "paragraph",
113113
"children": [
114114
{
115115
"type": "text",

test/fixture/flow-default.output.custom.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ Very Important Transform
88
- `input` **Array<string>**
99

1010
- `options` **[Object]**
11-
(optional, default
12-
13-
`{}`
14-
15-
)
16-
11+
(optional, default `{}`)
1712

1813

1914
Returns **string**

test/fixture/flow-default.output.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ Very Important Transform
88
- `input` **Array<string>**
99

1010
- `options` **[Object]**
11-
(optional, default
12-
13-
`{}`
14-
15-
)
16-
11+
(optional, default `{}`)
1712

1813

1914
Returns **string**

test/fixture/flow-default.output.md.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
}
164164
},
165165
{
166-
"type": "root",
166+
"type": "paragraph",
167167
"children": [
168168
{
169169
"type": "text",

test/fixture/optional.output.custom.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ Represents an IPv6 address
88
- `address` **string** An IPv6 address string
99

1010
- `groups` **[number]** How many octets to parse
11-
(optional, default
12-
13-
`8`
14-
15-
)
16-
11+
(optional, default `8`)
1712

1813

1914
**Examples**

test/fixture/optional.output.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ Represents an IPv6 address
88
- `address` **string** An IPv6 address string
99

1010
- `groups` **[number]** How many octets to parse
11-
(optional, default
12-
13-
`8`
14-
15-
)
16-
11+
(optional, default `8`)
1712

1813

1914
**Examples**

test/fixture/optional.output.md.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
}
228228
},
229229
{
230-
"type": "root",
230+
"type": "paragraph",
231231
"children": [
232232
{
233233
"type": "text",

test/fixture/param_nest.output.custom.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ Create a GeoJSON data source instance given an options object
1010
The latter is preferable in case of large GeoJSON files.
1111

1212
- `options.maxzoom` **[number]** Maximum zoom to preserve detail at.
13-
(optional, default
14-
15-
`14`
16-
17-
)
18-
13+
(optional, default `14`)
1914
- `options.buffer` **[number]** Tile buffer on each side.
2015

2116
- `options.tolerance` **[number]** Simplification tolerance (higher means simpler).

test/fixture/param_nest.output.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ Create a GeoJSON data source instance given an options object
1010
The latter is preferable in case of large GeoJSON files.
1111

1212
- `options.maxzoom` **[number]** Maximum zoom to preserve detail at.
13-
(optional, default
14-
15-
`14`
16-
17-
)
18-
13+
(optional, default `14`)
1914
- `options.buffer` **[number]** Tile buffer on each side.
2015

2116
- `options.tolerance` **[number]** Simplification tolerance (higher means simpler).

test/fixture/param_nest.output.md.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
}
309309
},
310310
{
311-
"type": "root",
311+
"type": "paragraph",
312312
"children": [
313313
{
314314
"type": "text",

0 commit comments

Comments
 (0)