common: drop leading 'v' in version numbers
[sheet.git] / browser.plp
index 48bd6e587f4e100279101c6e81a036506552b7d7..782bea8628ddf3128fd58d2927f5fba28856db5b 100644 (file)
@@ -6,7 +6,7 @@ no if $] >= 5.018, warnings => 'experimental::smartmatch';
 
 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.",
@@ -272,6 +272,7 @@ sub featurescore {
                        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};
                                }
                        }
@@ -299,6 +300,7 @@ sub featurescore {
 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($_);