Skip to content

chore: sanitize newlines in flags table default and type values#9407

Merged
reggi merged 1 commit into
release/v11from
reggi/fix-docs-table-newlines-v11
May 26, 2026
Merged

chore: sanitize newlines in flags table default and type values#9407
reggi merged 1 commit into
release/v11from
reggi/fix-docs-table-newlines-v11

Conversation

@reggi
Copy link
Copy Markdown
Contributor

@reggi reggi commented May 26, 2026

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.

The generateFlagsTable function was not stripping newlines from
defaultVal and typeVal, causing multi-line values (like --access's
defaultDescription) to break markdown table rows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reggi reggi requested review from a team as code owners May 26, 2026 17:35
@reggi reggi changed the title fix(docs): sanitize newlines in flags table default and type values chore: sanitize newlines in flags table default and type values May 26, 2026
@reggi reggi merged commit aeceb23 into release/v11 May 26, 2026
9 checks passed
@reggi reggi deleted the reggi/fix-docs-table-newlines-v11 branch May 26, 2026 18:14
@github-actions github-actions Bot mentioned this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants