$lookahead = $context - $penalty;
}
- push @links, $link;
+ push @links, $link unless $links[-1] eq $link;
}
- use List::MoreUtils 'uniq';
- @links = uniq @links;
for my $i (0 .. $#links - 1) {
my ($link, $lastchar) = $links[$i + 1] =~ /(.*)(.)/;
$link .= $lastchar le 'a' ? '.' : chr( ord($lastchar) - 1 );