${escapeHtml(msg)}`;
}
// Shape check before any `.map`: a non-array `head`/`body`, or a row that
// is not an array, used to throw out of render() and kill the whole
// document instead of producing the error box every other path returns.
const problem = validateTableData(data);
if (problem) {
return `${escapeHtml(problem)}`;
}
const aligns = data.align ?? [];
let headHtml = "";
if (data.head) {
headHtml =
"