@@ -32,18 +32,20 @@ def self.feature_rows
32
32
tt = format ( '%-24s' , ft . title . size > 24 ? ft . title [ 0 ..23 ] . strip + '..'
33
33
: ft . title )
34
34
35
- [ { content : "[#{ ft . status } ]" , color : cl } , pc , tt , *ft . current_support ]
35
+ [ { content : "[#{ ft . status } ]" , color : cl } , pc ,
36
+ { content : tt , color : :default } , *ft . current_support ]
36
37
end
37
38
end
38
39
39
40
def self . browser_rows
40
41
@browser_rows ||= Cani . api . browsers . map do |bwsr |
41
- [ bwsr . title , 'usage: ' + format ( '%.4f%%' , bwsr . usage . values . reduce ( 0 ) { |total , add | total + add } ) ]
42
+ [ { content : bwsr . title , color : :default } ,
43
+ 'usage: ' + format ( '%.4f%%' , bwsr . usage . values . reduce ( 0 ) { |total , add | total + add } ) ]
42
44
end
43
45
end
44
46
45
47
def self . browser_usage_rows ( brwsr )
46
- brwsr . usage . map { |( v , u ) | [ v , 'usage: ' + format ( '%.4f%%' , u ) ] } . reverse
48
+ brwsr . usage . map { |( v , u ) | [ { content : v , color : :default } , 'usage: ' + format ( '%.4f%%' , u ) ] } . reverse
47
49
end
48
50
49
51
def self . browser_feature_rows ( brwsr , version )
@@ -54,7 +56,7 @@ def self.browser_feature_rows(brwsr, version)
54
56
features . map do |feature |
55
57
color = { 'un' => :yellow , 'ot' => :magenta } . fetch feature [ :status ] , :green
56
58
[ { content : "[#{ feature [ :status ] } ]" , color : color } ,
57
- "[#{ type [ :symbol ] } ]" , feature [ :title ] ]
59
+ "[#{ type [ :symbol ] } ]" , { content : feature [ :title ] , color : :default } ]
58
60
end
59
61
end
60
62
end . compact
0 commit comments