browser: round *.0 versions in single cells
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 27 Apr 2017 15:45:22 +0000 (17:45 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 29 May 2017 17:21:27 +0000 (19:21 +0200)
Currently only used with multiple versions for Safari, such as "7.0-7.1"
which given as minimum "7.0" represents unnecessary accuracy.

browser.plp

index 83a9678ef6f2b3b319f66e8500e2b65c4c11542e..1073e4945a54f4caec8e2d23d887c4b7b028b26e 100644 (file)
@@ -459,7 +459,7 @@ sub paddedver {
 sub showversions {
        # title to describe minumum version and optional maximum for multiple cells
        my @span = (map { split /-/ } grep { defined } @_);
 sub showversions {
        # title to describe minumum version and optional maximum for multiple cells
        my @span = (map { split /-/ } grep { defined } @_);
-       return $span[0] if @_ <= 1;
+       return $span[0] =~ s/\.0\z//r if @_ <= 1;
        splice @span, 1, -1;
        return join('‒', @span);
 }
        splice @span, 1, -1;
        return join('‒', @span);
 }