Render a predefined string for empty markdown table instead of pipe characters (#1387)

This commit is contained in:
Marek S. Łukasiewicz
2025-05-08 15:09:40 +02:00
committed by GitHub
parent 57c4317b49
commit b93f622e9b
+5
View File
@@ -60,6 +60,11 @@ export async function jsonToMDTable(
}
}
// Handle empty case manually, instead of three lines of ||
if (headers.size == 0) {
return "*(empty table)*";
}
const headerList = [...headers];
const lines = [];
lines.push(