lint-gitlink: don't use empty lower bound in .{0,8}
The regex quantifier {,n} was added in Perl 5.34.0 as a shorthand
for {0,n}. That makes it too new an introduction for Git which
targets Perl 5.26.0.
Even though Documentation/lint-gitlink.perl is a development helper
script, let's stick to the general Perl version requirement for
consistency, and use an explicit zero in .{0,8}.
Signed-off-by: Tuomas Ahola <taahol@utu.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
parent
e9019fcafe
commit
8a631963a9
|
|
@ -42,7 +42,7 @@ die "BUG: No list of valid linkgit:* files given" unless @ARGV;
|
|||
while (<>) {
|
||||
my $line = $_;
|
||||
next if $line =~ /^\s*(ifn?def|endif)::/;
|
||||
while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) {
|
||||
while ($line =~ m/(.{0,8})((git[-a-z]+|scalar)\[(\d)*\])/g) {
|
||||
my $pos = pos $line;
|
||||
my ($macro, $target, $page, $section) = ($1, $2, $3, $4);
|
||||
if ( $macro ne "linkgit:" ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue