bugfix: set color level when color is forced (#7216)
Color level 1 matches our usages, level 0 is no color
This commit is contained in:
parent
2d05487293
commit
ca86648726
@ -190,7 +190,7 @@ export function codeFrameColumns(
|
|||||||
(opts.highlightCode && Chalk.supportsColor) || opts.forceColor;
|
(opts.highlightCode && Chalk.supportsColor) || opts.forceColor;
|
||||||
let chalk = Chalk;
|
let chalk = Chalk;
|
||||||
if (opts.forceColor) {
|
if (opts.forceColor) {
|
||||||
chalk = new Chalk.constructor({ enabled: true });
|
chalk = new Chalk.constructor({ enabled: true, level: 1 });
|
||||||
}
|
}
|
||||||
const maybeHighlight = (chalkFn, string) => {
|
const maybeHighlight = (chalkFn, string) => {
|
||||||
return highlighted ? chalkFn(string) : string;
|
return highlighted ? chalkFn(string) : string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user