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