@@ -122,8 +122,10 @@ pub enum Attribute {
122
122
Italic ,
123
123
Underlined ,
124
124
Blink ,
125
+ BlinkFast ,
125
126
Reverse ,
126
127
Hidden ,
128
+ StrikeThrough ,
127
129
}
128
130
129
131
impl Attribute {
@@ -135,8 +137,10 @@ impl Attribute {
135
137
Attribute :: Italic => 3 ,
136
138
Attribute :: Underlined => 4 ,
137
139
Attribute :: Blink => 5 ,
140
+ Attribute :: BlinkFast => 6 ,
138
141
Attribute :: Reverse => 7 ,
139
142
Attribute :: Hidden => 8 ,
143
+ Attribute :: StrikeThrough => 9 ,
140
144
}
141
145
}
142
146
}
@@ -214,8 +218,10 @@ impl Style {
214
218
"dim" => rv. dim ( ) ,
215
219
"underlined" => rv. underlined ( ) ,
216
220
"blink" => rv. blink ( ) ,
221
+ "blink_fast" => rv. blink_fast ( ) ,
217
222
"reverse" => rv. reverse ( ) ,
218
223
"hidden" => rv. hidden ( ) ,
224
+ "strikethrough" => rv. strikethrough ( ) ,
219
225
on_c if on_c. starts_with ( "on_" ) => {
220
226
if let Ok ( n) = on_c[ 3 ..] . parse :: < u8 > ( ) {
221
227
rv. on_color256 ( n)
@@ -396,13 +402,21 @@ impl Style {
396
402
self . attr ( Attribute :: Blink )
397
403
}
398
404
#[ inline]
405
+ pub fn blink_fast ( self ) -> Style {
406
+ self . attr ( Attribute :: BlinkFast )
407
+ }
408
+ #[ inline]
399
409
pub fn reverse ( self ) -> Style {
400
410
self . attr ( Attribute :: Reverse )
401
411
}
402
412
#[ inline]
403
413
pub fn hidden ( self ) -> Style {
404
414
self . attr ( Attribute :: Hidden )
405
415
}
416
+ #[ inline]
417
+ pub fn strikethrough ( self ) -> Style {
418
+ self . attr ( Attribute :: StrikeThrough )
419
+ }
406
420
}
407
421
408
422
/// Wraps an object for formatting for styling.
@@ -586,13 +600,21 @@ impl<D> StyledObject<D> {
586
600
self . attr ( Attribute :: Blink )
587
601
}
588
602
#[ inline]
603
+ pub fn blink_fast ( self ) -> StyledObject < D > {
604
+ self . attr ( Attribute :: BlinkFast )
605
+ }
606
+ #[ inline]
589
607
pub fn reverse ( self ) -> StyledObject < D > {
590
608
self . attr ( Attribute :: Reverse )
591
609
}
592
610
#[ inline]
593
611
pub fn hidden ( self ) -> StyledObject < D > {
594
612
self . attr ( Attribute :: Hidden )
595
613
}
614
+ #[ inline]
615
+ pub fn strikethrough ( self ) -> StyledObject < D > {
616
+ self . attr ( Attribute :: StrikeThrough )
617
+ }
596
618
}
597
619
598
620
macro_rules! impl_fmt {
0 commit comments