From: Mischa POSLAWSKY Date: Thu, 27 Apr 2017 15:45:22 +0000 (+0200) Subject: browser: round *.0 versions in single cells X-Git-Tag: v1.10~46 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/c59e0de4b5b4ef59a1972e7bf404d3ec6bce4024 browser: round *.0 versions in single cells Currently only used with multiple versions for Safari, such as "7.0-7.1" which given as minimum "7.0" represents unnecessary accuracy. --- diff --git a/browser.plp b/browser.plp index 83a9678..1073e49 100644 --- a/browser.plp +++ b/browser.plp @@ -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 } @_); - return $span[0] if @_ <= 1; + return $span[0] =~ s/\.0\z//r if @_ <= 1; splice @span, 1, -1; return join('‒', @span); }