Html({
title => 'browser compatibility cheat sheet',
- version => 'v1.2',
+ version => '1.3',
description => [
"Compatibility table of new web features (HTML5, CSS3, SVG, Javascript)",
"comparing support and usage share for all popular browser versions.",
x => sub {
join(' ',
'requires prefix',
- (map "-$_-", $caniuse->{agents}->{$_[0]}->{prefix} // ()),
+ map {"-$_-"}
+ ($caniuse->{agents}->{$_[0]}->{prefix_exceptions} // {})->{$_[1]}
+ // $caniuse->{agents}->{$_[0]}->{prefix} // (),
);
},
);
while (my ($browser, $versions) = each %$row) {
ref $versions eq 'HASH' or next;
while (my ($version, $status) = each %$versions) {
+ $status =~ s/\h\#\d+//;
$rank += ($canihas->{$browser}->{$version} || .001) * $PSTATS{$status};
}
}
sub formatnotes {
my @html = @_;
for (@html) {
+ s/\r\n?/\n/g; # windows returns
s/\h* $//gmx; # trailing whitespace
s/(?<= [^.\n]) $/./gmx; # consistently end each line by a period
Entity($_);
# prepare version hover details
my $title = sprintf('%.1f%% %s', $usage * $usagepct, join(', ',
- map { ref $_ eq 'CODE' ? $_->($browser) : $_ }
+ map { ref $_ eq 'CODE' ? $_->($browser, $span[0]->[0]) : $_ }
map { $DSTATS{$_} // () }
map { split / /, $_ }
$prev