refactor(cli): 🔨 /stylize: change dimmed to "dim" everywhere
This commit is contained in:
parent
6871646072
commit
30f87f9626
@ -17,7 +17,7 @@ fn main() -> Result<()> {
|
||||
let red_on_blue = stylize("[white on blue]", "white on blue");
|
||||
let rgb = stylize("[#3a95ef]", "#3a95ef");
|
||||
let rgb_on_rgb = stylize("[#3a95ef on #c174dd]", "#3a95ef on #c174dd");
|
||||
let rgb_dim = stylize("[#3a95ef+dimmed]", "#3a95ef+dimmed");
|
||||
let rgb_dim = stylize("[#3a95ef+dim]", "#3a95ef+dim");
|
||||
|
||||
println!("pre {} post", red_bold);
|
||||
println!("pre {} post", alt_red_bold);
|
||||
|
||||
@ -106,7 +106,7 @@ bitflags! {
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
pub struct StyleAttributes: u8 {
|
||||
const BOLD = 0b00000001;
|
||||
const DIMMED = 0b00000010;
|
||||
const DIM = 0b00000010;
|
||||
const ITALIC = 0b00000100;
|
||||
const UNDERLINE = 0b00001000;
|
||||
const BLINK = 0b00010000;
|
||||
@ -122,7 +122,7 @@ impl StyleAttributes {
|
||||
if self.contains(StyleAttributes::BOLD) {
|
||||
v.push("1");
|
||||
}
|
||||
if self.contains(StyleAttributes::DIMMED) {
|
||||
if self.contains(StyleAttributes::DIM) {
|
||||
v.push("2");
|
||||
}
|
||||
if self.contains(StyleAttributes::ITALIC) {
|
||||
|
||||
@ -126,7 +126,7 @@ pub trait Stylize {
|
||||
fn on_bright_white(&self) -> String { self.stl("on bright-white") }
|
||||
fn on_rgb(&self, r: u8, g: u8, b: u8) -> String { self.stl(&format!("on #{:02X}{:02X}{:02X}", r, g, b)) }
|
||||
fn bold(&self) -> String { self.stl("+bold") }
|
||||
fn dim(&self) -> String { self.stl("+dimmed") }
|
||||
fn dim(&self) -> String { self.stl("+dim") }
|
||||
fn italic(&self) -> String { self.stl("+italic") }
|
||||
fn underline(&self) -> String { self.stl("+underline") }
|
||||
fn blink(&self) -> String { self.stl("+blink") }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user