renderCompilationStatus = (source, warnings, errors) => {
const renderedWarnings = warnings && warnings.length >0 ?
htl.html`<h3>Compiler warnings</h3><table style="max-width: none;"><thead>
<tr>${toColumns(warnings).map(col => htl.html`<th>${col}</th>`)}</tr>
</thead>
<tbody>
${toTable(warnings, source).map(row => htl.html`<tr>
${Object.values(row).map(cell => htl.html`<td><pre style="text-wrap: balance;">${cell}</pre></td>`)}
</tr>`)}
</tbody>
</table>
` : htl.html`<code>No warnings</code><br>`
const renderedErrors = errors ? htl.html`<h3>Compiler errors</h3><table style="max-width: none;">
<thead>
<tr>
${toColumns(errors).map(col => htl.html`<th>${col}</th>`)}
</tr>
</thead>
<tbody>
${toTable(errors, source).map(row => htl.html`<tr>
${Object.values(row).map(cell => htl.html`<td><pre style="text-wrap: balance;">${cell}</pre></td>`)}
</tr>`)}
</tbody>
</table>
` : htl.html`<code>No errors</code>`
return htl.html`${renderedWarnings}${renderedErrors}`
}