style: enhance markdown inline formatting colors

This commit is contained in:
mitchell 2026-05-17 19:40:45 -04:00
parent 03dee78e0c
commit 4f9e7a7a1a

View file

@ -120,9 +120,7 @@ export async function renderMarkdown(
.header(header) .header(header)
.body(body) .body(body)
.border() .border()
.maxColWidth( .maxColWidth(Math.floor((columns - 3) / header.length))
Math.floor(columns / header.length) - Math.floor(header.length / 2),
)
.toString(); .toString();
header = []; header = [];
body = []; body = [];
@ -140,13 +138,13 @@ export async function renderMarkdown(
}, },
td: (children) => `:tablesep:${children}`, td: (children) => `:tablesep:${children}`,
th: (children) => { th: (children) => {
header.push(new SWCell(chalk.red(children))); header.push(new SWCell(chalk.red.bold(children)));
return null; return null;
}, },
strong: (children) => chalk.bold(children), strong: (children) => chalk.bold.rgb(254, 254, 254)(children),
emphasis: (children) => chalk.italic(children), emphasis: (children) => chalk.italic.rgb(254, 254, 254)(children),
strikethrough: (children) => chalk.grey.strikethrough(children), strikethrough: (children) => chalk.grey.strikethrough(children),
codespan: (children) => chalk.bgYellow.black(children), codespan: (children) => chalk.bgYellow.black.bold(children),
link: (children, { href }) => link: (children, { href }) =>
chalk.blueBright.underline(terminalLink(children, href)), chalk.blueBright.underline(terminalLink(children, href)),
image: () => chalk.red("Images are unsupported (for now)\n"), image: () => chalk.red("Images are unsupported (for now)\n"),