export function markdownTable(headers, rows) {
    const cleanHeaders = headers.map(formatCell);
    const cleanRows = rows.map((row) => row.map(formatCell));
    return [
        `| ${cleanHeaders.join(' | ')} |`,
        `| ${cleanHeaders.map(() => '---').join(' | ')} |`,
        ...cleanRows.map((row) => `| ${row.join(' | ')} |`)
    ].join('\n');
}
function formatCell(value) {
    return String(value ?? '').replace(/\|/g, '\\|').replace(/\n+/g, '<br>');
}
//# sourceMappingURL=markdown-table.js.map