summaryrefslogtreecommitdiff
path: root/Porting
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-03-09 17:32:37 +0100
committerYves Orton <demerphq@gmail.com>2023-03-13 21:25:33 +0800
commit1c182948727448fbc828fea5d504bc4fcbac9fcd (patch)
tree0680a945e1e3401a7bea5324c7b48ba1fb29a6af /Porting
parent351ceb16a6ce2fb54d5a88bd12017b9e4f617466 (diff)
downloadperl-1c182948727448fbc828fea5d504bc4fcbac9fcd.tar.gz
Porting/manifest_lib.pl - autofix space/tab issues on `make manisort`
Diffstat (limited to 'Porting')
-rw-r--r--Porting/manifest_lib.pl9
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;