From 905f4ecc82ceb28f2714b47c4816d935bbd530f6 Mon Sep 17 00:00:00 2001 From: reggi Date: Fri, 22 May 2026 14:30:30 -0400 Subject: [PATCH] fix(docs): sanitize newlines in flags table default and type values 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> --- docs/lib/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/lib/index.js b/docs/lib/index.js index d7a5e83ccf506..9779d54657293 100644 --- a/docs/lib/index.js +++ b/docs/lib/index.js @@ -151,10 +151,12 @@ const generateFlagsTable = (definitionPool) => { if (!defaultVal) { defaultVal = String(def.default) } + defaultVal = defaultVal.replace(/\n/g, ' ').trim() let typeVal = def.typeDescription || String(def.type) if (def.required) { typeVal = `${typeVal} (required)` } + typeVal = typeVal.replace(/\n/g, ' ').trim() const desc = (def.description || '').replace(/\n/g, ' ').trim() return `| ${flagsStr} | ${defaultVal} | ${typeVal} | ${desc} |` })