From 6680d7e7c4230787edb69e2967d6a5fd99ba4f3e Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 30 Oct 2024 17:38:24 -0700 Subject: [PATCH] correct documentation for --delete-old-whitespace --- bin/perltidy | 9 +++++---- lib/Perl/Tidy/Formatter.pm | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/perltidy b/bin/perltidy index f85f8dce..6a852058 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -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 diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 65b8b93a..40902a4b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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 ) { -- 2.39.5