mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 06:00:14 +00:00
pt-va: Delimit sentences by . or ?
This commit is contained in:
@@ -3598,9 +3598,9 @@ sub print_advice {
|
||||
foreach my $id ( @$advice ) {
|
||||
my $info = $adv->get_rule_info($id);
|
||||
my @desc = map {
|
||||
$_ .= '.' unless m/\.$/;
|
||||
$_ .= '.' unless m/[.?]$/;
|
||||
$_;
|
||||
} split(/\.\s{1,2}/, $info->{description} || '');
|
||||
} split(/(?<=[.?])\s{1,2}/, $info->{description} || '');
|
||||
$desc[1] ||= ""; # Some desc have only 1 sentence.
|
||||
my $desc = $verbose == 1 ? $desc[0] # terse
|
||||
: $verbose == 2 ? "$desc[0] $desc[1]" # fuller
|
||||
|
Reference in New Issue
Block a user