aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@frank.tg14.gathering.org>2014-04-16 15:55:09 +0200
committerroot <root@frank.tg14.gathering.org>2014-04-16 15:55:09 +0200
commit3430d3f965ddac5d24890d56462049b4402084cd (patch)
tree5307ae2d8aa209361b5ef87a8d958f519de0e952
parent35a1d8178ec6e1af28864a6ebd75cb2cc68f7490 (diff)
Tweak the shortening in nettkart.
-rwxr-xr-xweb/nms.gathering.org/nettkart.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/nms.gathering.org/nettkart.pl b/web/nms.gathering.org/nettkart.pl
index 6711dae..f6dd2c2 100755
--- a/web/nms.gathering.org/nettkart.pl
+++ b/web/nms.gathering.org/nettkart.pl
@@ -99,7 +99,7 @@ while (my $ref = $q->fetchrow_hashref()) {
my $max_textlen = ($x2-$x1) > ($y2-$y1) ? $x2-$x1 : $y2-$y1;
while (length($sysname) * 6 > $max_textlen) {
# Try to abbreviate sysname if it is too long for the box
- $sysname =~ s/^(.*)[a-z]~?([0-9]+)$/$1~$2/ or last;
+ $sysname =~ s/^(.*)[a-z]~?([0-9-]+)$/$1~$2/ or last;
}
if (($x2-$x1) > ($y2-$y1)) {
$text_img->string(gdSmallFont,$x1+2,$y1,$sysname,$blk);