X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/2f5f28c948406425d97ef013ac64e9a73f40dd29..94259759473e60e9fb3823864031e827f09cc607:/browser.plp diff --git a/browser.plp b/browser.plp index e6491cb..06e55e5 100644 --- a/browser.plp +++ b/browser.plp @@ -73,10 +73,7 @@ my %CSTATUS = ( ); my %versions; while (my ($browser, $row) = each %{ $caniuse->{agents} }) { - $versions{$browser} = [ - sort { paddedver($a) cmp paddedver($b) } grep { defined } - @{ $row->{versions} } - ]; + $versions{$browser} = [@{ $row->{versions} }]; } my $ref = showlink('Can I use', 'https://caniuse.com/'); @@ -311,6 +308,7 @@ sub formatnotes { s/(?<= [^.\n]) $/./gmx; # consistently end each line by a period Entity($_); s{ ` ([^`]*) ` }{$1}gx; + s{ \(\K (?: \Qhttps://caniuse.com\E )? (?: /? \#feat= | / ) }{#}gx; s{ \[ ([^]]*) \] \( ([^)]*) \) }{$1}gx; } return @html; @@ -469,7 +467,7 @@ sub paddedver { # normalised version number comparable as string (cmp) $_[0] =~ m/(?:.*-|^)(\d*)(.*)/; # matched (major)(.minor) of last value in range (a-B) - return sprintf('%02d', length $1 ? $1 : 99) . $2; + return sprintf('%03d', length $1 ? $1 : 999) . $2; } sub showversions {