Fix
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
This commit is contained in:
parent
07bb6e90f8
commit
b0e338a3a7
1 changed files with 2 additions and 4 deletions
|
|
@ -73,8 +73,6 @@ styles.visible = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getModelAnsi = (model, level, type, ...arguments_) => {
|
const getModelAnsi = (model, level, type, ...arguments_) => {
|
||||||
level = levelMapping[level];
|
|
||||||
|
|
||||||
if (model === 'rgb') {
|
if (model === 'rgb') {
|
||||||
if (level === 'ansi16m') {
|
if (level === 'ansi16m') {
|
||||||
return ansiStyles[type].ansi16m(...arguments_);
|
return ansiStyles[type].ansi16m(...arguments_);
|
||||||
|
|
@ -101,7 +99,7 @@ for (const model of usedModels) {
|
||||||
get() {
|
get() {
|
||||||
const {level} = this;
|
const {level} = this;
|
||||||
return function (...arguments_) {
|
return function (...arguments_) {
|
||||||
const styler = createStyler(getModelAnsi(model, level, 'color', ...arguments_), ansiStyles.color.close, this._styler);
|
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this._styler);
|
||||||
return createBuilder(this, styler, this._isEmpty);
|
return createBuilder(this, styler, this._isEmpty);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +110,7 @@ for (const model of usedModels) {
|
||||||
get() {
|
get() {
|
||||||
const {level} = this;
|
const {level} = this;
|
||||||
return function (...arguments_) {
|
return function (...arguments_) {
|
||||||
const styler = createStyler(getModelAnsi(model, level, 'bgColor', ...arguments_), ansiStyles.bgColor.close, this._styler);
|
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this._styler);
|
||||||
return createBuilder(this, styler, this._isEmpty);
|
return createBuilder(this, styler, this._isEmpty);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue