mirror of https://github.com/apache/lucene.git
stop emitting warning about undefined variable $1 in the case of no leading text to trim from a line (i.e. $type is empty and there is no leading whitespace)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1528670 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b50a2edbb2
commit
2cb0a5c0da
|
@ -195,7 +195,7 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
|
|||
my $line;
|
||||
my $item = $_;
|
||||
$item =~ s/^(\s*\Q$type\E\s*)//; # Trim the leading bullet
|
||||
my $leading_ws_width = length($1);
|
||||
my $leading_ws_width = defined($1) ? length($1) : 0;
|
||||
$item =~ s/\s+$//; # Trim trailing whitespace
|
||||
$item .= "\n";
|
||||
|
||||
|
|
Loading…
Reference in New Issue