widdershins
widdershins copied to clipboard
Multiline markdown in response examples breaks table in Markdown
Describe the bug
According to the OpenAPI v3 specification CommonMark may be used for the description
field of a response object.
Example:
responses:
'201':
description: |
Foo bar:
- item 1
- item 2
content:
application/json:
schema:
$ref: '#/components/schemas/FooBar'
However, when generating docs from a specification like this then the Markdown table which describes the possible responses is broken because Markdown cells must be single line.
I think this is very similar to this issue which was already reported in the past: https://github.com/Mermade/widdershins/issues/211
Expected behavior
Flatten the contents of the table cells using HTML (e.g. <br>
, etc).
Screenshots
Versions:
"widdershins": "^4.0.1"