Commit aeceb23
chore: sanitize newlines in flags table default and type values (#9407)
Backport of #9393 to release/v11.
The `generateFlagsTable` function in `docs/lib/index.js` sanitizes
`description` for newlines but not `defaultVal` or `typeVal`. Multi-line
`defaultDescription` values (like `--access`) break the markdown table
rendering.
Adds `.replace(/\n/g, ' ').trim()` to both `defaultVal` and `typeVal`,
matching the existing sanitization on `desc`.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent cde03ba commit aeceb23
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| |||
0 commit comments