Skip to content

Commit 63c0ca6

Browse files
committed
Fix type applications creating accidental elements in Markdown
1 parent eb1089e commit 63c0ca6

10 files changed

+11
-11
lines changed

lib/markdown_format_type.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ function formatType(type) {
1414
case 'OptionalType':
1515
return '[' + formatType(type.expression) + ']';
1616
case 'TypeApplication':
17-
return formatType(type.expression) + '<' +
17+
return formatType(type.expression) + '&lt;' +
1818
type.applications.map(function (application) {
1919
return formatType(application);
20-
}).join(', ') + '>';
20+
}).join(', ') + '&gt;';
2121
case 'UndefinedLiteral':
2222
return 'undefined';
2323
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Very Important Transform
55

66
**Parameters**
77

8-
- `input` **Array<string>**
8+
- `input` **Array&lt;string&gt;**
99

1010
- `options` **[Object]**
1111
(optional, default

test/fixture/flow-default.output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Very Important Transform
55

66
**Parameters**
77

8-
- `input` **Array<string>**
8+
- `input` **Array&lt;string&gt;**
99

1010
- `options` **[Object]**
1111
(optional, default

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"children": [
9696
{
9797
"type": "text",
98-
"value": "Array<string>"
98+
"value": "Array&lt;string&gt;"
9999
}
100100
]
101101
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This function returns the number one.
1111

1212
- `c` **[boolean]**
1313

14-
- `d` **Array<number>**
14+
- `d` **Array&lt;number&gt;**
1515

1616
- `e` **Object**
1717

test/fixture/flow-types.output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This function returns the number one.
1111

1212
- `c` **[boolean]**
1313

14-
- `d` **Array<number>**
14+
- `d` **Array&lt;number&gt;**
1515

1616
- `e` **Object**
1717

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
"children": [
231231
{
232232
"type": "text",
233-
"value": "Array<number>"
233+
"value": "Array&lt;number&gt;"
234234
}
235235
]
236236
},

test/fixture/type_application.output.custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Represents an IPv6 address
55

66
**Parameters**
77

8-
- `address` **Array<string>** An IPv6 address string
8+
- `address` **Array&lt;string&gt;** An IPv6 address string
99

1010

1111

test/fixture/type_application.output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Represents an IPv6 address
55

66
**Parameters**
77

8-
- `address` **Array<string>** An IPv6 address string
8+
- `address` **Array&lt;string&gt;** An IPv6 address string
99

1010

1111

test/fixture/type_application.output.md.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"children": [
9696
{
9797
"type": "text",
98-
"value": "Array<string>"
98+
"value": "Array&lt;string&gt;"
9999
}
100100
]
101101
},

0 commit comments

Comments
 (0)