Html({
title => 'browser compatibility cheat sheet',
version => 'v1.0',
- description =>
- "caniuse.",
+ description => [
+ "Compatibility table of new web features (HTML5, CSS3, SVG, Javascript)",
+ "comparing support and usage share for all popular browser versions.",
+ ],
keywords => [qw'
web browser support compatibility usage available feature
html html5 css css3 svg javascript js dom mobile
} $row->{title};
print '<div class=aside>';
s/\.?$/./, print "<p>$_</p>" for map { ref $_ ? @$_ : $_ || () }
- Entity($row->{description}), formathtml($row->{notes}); # sic
+ Entity($row->{description}),
+ map { s/\s*\n/\n<br>/g; $_ } $row->{notes};
printf 'Resources: %s.', join(', ', map {
sprintf '<a href="%s">%s</a>', EscapeHTML($_->{url}), $_->{title}
} @$_) for grep { @$_ } $row->{links} // ();
+ printf '<br>Parent feature: %s.', join(', ', map {
+ sprintf '<a href="%s">%s</a>', EscapeHTML("#$_"), $caniuse->{data}->{$_}->{title}
+ } $_) for $row->{parent} || ();
print '</div>';
}
say '</tbody>';
say '</table>';
-sub formathtml {
- my $ref = defined wantarray ? [@_] : \@_;
- for (@$ref) {
- s/& (?!\w)/&/gx;
- s/< \s/</gx;
- s/\n\K\n/<br>/g;
- }
- return @$ref;
-}
-
sub paddedver {
# normalised version number comparable as string (cmp)
shift =~ /(?:.*-|^)(\d*)(.*)/;