fix: add missing pipe delimiters in Markdown table rows (#1002)

This commit is contained in:
Sylvain
2026-04-22 09:05:38 +02:00
committed by GitHub
parent efb80cc6b3
commit 8c2e412bab
+2 -2
View File
@@ -12,10 +12,10 @@ function formatMarkdownTable(headers, rows) {
const separator = colWidths.map((w) => "-".repeat(w)).join(" | ");
const headerRow = headers.map((h, i) => pad(h, colWidths[i])).join(" | ");
const dataRows = rows
.map((row) => row.map((cell, i) => pad(cell, colWidths[i])).join(" | "))
.map((row) => `| ${row.map((cell, i) => pad(cell, colWidths[i])).join(" | ")} |`)
.join("\n");
return `| ${headerRow} |\n| ${separator} |\n| ${dataRows} |`;
return `| ${headerRow} |\n| ${separator} |\n${dataRows}`;
}
export function jsonToDocumentation(obj) {