correct documentation for --delete-old-whitespace
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 31 Oct 2024 00:38:24 +0000 (17:38 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 31 Oct 2024 00:38:24 +0000 (17:38 -0700)
bin/perltidy
lib/Perl/Tidy/Formatter.pm

index f85f8dceccd275e4306de199a602cb5c988e5580..6a852058969f444ea1223f5d8891df55e8455d7a 100755 (executable)
@@ -1438,10 +1438,11 @@ B<-naws>.  (Use B<--freeze-whitespace> (B<-fws>) to leave whitespace completely
 
 =item B<-dws>,  B<--delete-old-whitespace>
 
-Setting this option allows perltidy to remove some old whitespace
-between characters, if necessary.  This is the default.  If you
-do not want any old whitespace removed, use B<-ndws> or
-B<--nodelete-old-whitespace>.
+Setting this option allows perltidy to remove optional whitespace between
+characters in the input file.  The default is to not to do this
+(B<-nodelete-old-whitespace>).  This parameter has little effect by itself.
+But in combination with B<--noadd-whitespace> it will cause most of the
+whitespace in a file to be removed.
 
 =item B<Detailed whitespace controls around tokens>
 
index 65b8b93a5e65600830a302236ecf2efb19282696..40902a4b560e5181be3414d1017d1d62f18663b8 100644 (file)
@@ -12921,7 +12921,7 @@ sub respace_tokens_inner_loop {
             }
 
             my $ws = $rwhitespace_flags->[$Knext];
-            if (   $ws == -1
+            if (   $ws == WS_NO
                 || $rOpts_delete_old_whitespace )
             {