Apply XO fixes
This commit is contained in:
parent
629d4e4890
commit
ef53fde412
1 changed files with 3 additions and 3 deletions
6
source/vendor/ansi-styles/index.js
vendored
6
source/vendor/ansi-styles/index.js
vendored
|
|
@ -104,7 +104,7 @@ function assembleStyles() {
|
||||||
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
||||||
Object.defineProperties(styles, {
|
Object.defineProperties(styles, {
|
||||||
rgbToAnsi256: {
|
rgbToAnsi256: {
|
||||||
value: (red, green, blue) => {
|
value(red, green, blue) {
|
||||||
// We use the extended greyscale palette here, with the exception of
|
// We use the extended greyscale palette here, with the exception of
|
||||||
// black and white. normal palette only has 4 greyscale shades.
|
// black and white. normal palette only has 4 greyscale shades.
|
||||||
if (red === green && green === blue) {
|
if (red === green && green === blue) {
|
||||||
|
|
@ -127,7 +127,7 @@ function assembleStyles() {
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
},
|
},
|
||||||
hexToRgb: {
|
hexToRgb: {
|
||||||
value: hex => {
|
value(hex) {
|
||||||
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
||||||
if (!matches) {
|
if (!matches) {
|
||||||
return [0, 0, 0];
|
return [0, 0, 0];
|
||||||
|
|
@ -156,7 +156,7 @@ function assembleStyles() {
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
},
|
},
|
||||||
ansi256ToAnsi: {
|
ansi256ToAnsi: {
|
||||||
value: code => {
|
value(code) {
|
||||||
if (code < 8) {
|
if (code < 8) {
|
||||||
return 30 + code;
|
return 30 + code;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue