style: enhance markdown inline formatting colors
This commit is contained in:
parent
03dee78e0c
commit
4f9e7a7a1a
1 changed files with 5 additions and 7 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue