browser: 3rd last version is also development
[sheet.git] / browser.plp
index beff4a9a99a251344883eb8d660de8f713541def..2ba6e01194ed5b89a5685b8978267b769f02dd90 100644 (file)
@@ -23,8 +23,11 @@ say "<h1>Browser compatibility</h1>\n";
 
 my $caniuse = do 'browser-support.inc.pl' or die $! || $@;
 $_->{verrelease} = {
-       # mark last two (future) versions as unreleased, ensure current isn't
-       map { $_->[-1] => 0, $_->[-2] => 0, $_->[-3] => undef } $_->{versions}
+       # mark last three (future) versions as unreleased, ensure current isn't
+       map {
+               $_->[-1] => 0, $_->[-2] => 0, $_->[-3] => 0,
+               $_->[-4] => undef,
+       } $_->{versions}
 } for values %{ $caniuse->{agents} };
 
 my %CSTATS = (
@@ -395,7 +398,7 @@ sub paddedver {
        # normalised version number comparable as string (cmp)
        shift =~ /(?:.*-|^)(\d*)(.*)/;
        # matched (major)(.minor) of last value in range (a-B)
-       return sprintf('%02d', $1 || 0) . $2;
+       return sprintf('%02d', $1 || 99) . $2;
 }
 
 sub showversions {