Skip to content

Multiline defaults break markdown tables #188

@c0m1c5an5

Description

@c0m1c5an5

If the default value of a key is a multi-line string, the resulting readme markdown table is broken.

Input:

## @param robots Static robots.txt content served by ALB load balancer for SEO/web crawler control
robots: "User-agent: *\nDisallow: /\n"

Or (produces the same result):

## @param robots Static robots.txt content served by ALB load balancer for SEO/web crawler control
robots: |
  User-agent: *
  Disallow: /

Result:

### Global parameters

| Name     | Description                                                                       | Value                        |
| -------- | --------------------------------------------------------------------------------- | ---------------------------- |
| `robots` | Static robots.txt content served by ALB load balancer for SEO/web crawler control | `User-agent: *
Disallow: /
` |

I suggest replacing all newlines inside the default value with "\n" (escaped newline) when writing it to a markdown table cell. This will at least keep the table in a correct format.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions