diff options
author | Yves Orton <demerphq@gmail.com> | 2023-03-09 17:32:37 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-03-13 21:25:33 +0800 |
commit | 1c182948727448fbc828fea5d504bc4fcbac9fcd (patch) | |
tree | 0680a945e1e3401a7bea5324c7b48ba1fb29a6af /Porting | |
parent | 351ceb16a6ce2fb54d5a88bd12017b9e4f617466 (diff) | |
download | perl-1c182948727448fbc828fea5d504bc4fcbac9fcd.tar.gz |
Porting/manifest_lib.pl - autofix space/tab issues on `make manisort`
Diffstat (limited to 'Porting')
-rw-r--r-- | Porting/manifest_lib.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Porting/manifest_lib.pl b/Porting/manifest_lib.pl index 555804836e..c062c94410 100644 --- a/Porting/manifest_lib.pl +++ b/Porting/manifest_lib.pl @@ -37,7 +37,14 @@ sub sort_manifest { my @line_tuples; foreach my $idx (0 .. $#lines) { my $line = $lines[$idx]; - $line =~ s/\t +/\t/; + # clean up tab/space issues + $line =~ s/\t[ ]+/\t/; + if ($line =~ s/^(\S+)([ ]\s+)(\S+.*)/$1\t/) { + my $descr = $2; + $descr =~ s/\t+/ /g; + $line .= $descr; + } + $line =~ s/\s+\z//; $line =~ /^(\S+)(?:\t+([^\t]*))?\z/ or do { $line =~ s/\t/\\t/g; |