common: bump version to 1.10
[sheet.git] / browser.plp
index 421d9eff7aaa0d1a930c173b2cac2628282970d2..7e096b0514733bc7f76d22f5921f606438019ce8 100644 (file)
@@ -4,7 +4,7 @@ no if $] >= 5.018, warnings => 'experimental::smartmatch';
 
 Html({
        title => 'browser compatibility cheat sheet',
-       version => '1.4',
+       version => '1.5',
        description => [
                "Compatibility table of new web features (HTML5, CSS3, SVG, Javascript)",
                "comparing support and usage share for all popular browser versions.",
@@ -243,7 +243,7 @@ for my $browser (@browsers) {
                                $span->[-1] eq $lastver ? () : '(development)',
                        ),
                        !defined $lastver && ' class="ex"',
-                       showversions($lastver),
+                       showversions($lastver // $span->[0]),
                );
        }
 }
@@ -455,9 +455,9 @@ say '</table>';
 
 sub paddedver {
        # normalised version number comparable as string (cmp)
-       shift =~ /(?:.*-|^)(\d*)(.*)/;
+       $_[0] =~ m/(?:.*-|^)(\d*)(.*)/;
        # matched (major)(.minor) of last value in range (a-B)
-       return sprintf('%02d', $1 || 99) . $2;
+       return sprintf('%02d', length $1 ? $1 : 99) . $2;
 }
 
 sub showversions {